Use JavaScript to set an incoming document to a content type

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2010 09:38 AM
Hi all
One of our requirements are when we add a document to a folder, we run a script that allows us to set that document as a specific Content Type. Now, in our Alfresco build we have a content type called Group IT Legal Doc. What we want to do is, when you add a file into the folder, make that document of type Group IT Legal Doc.
I've been looking around and so far I haven't found anything that allows you to do this explicitly, so is it possible? I know you can create nodes of specific content types, but that's not quite the same.
One of our requirements are when we add a document to a folder, we run a script that allows us to set that document as a specific Content Type. Now, in our Alfresco build we have a content type called Group IT Legal Doc. What we want to do is, when you add a file into the folder, make that document of type Group IT Legal Doc.
I've been looking around and so far I haven't found anything that allows you to do this explicitly, so is it possible? I know you can create nodes of specific content types, but that's not quite the same.
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2010 04:21 AM
Try adding a business rule on all items with action "Specialize type" and selecting your content type. Hope it helps

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2010 10:58 AM
You can use the JavaScript method specializeType() (note the 'z') to change any file to another type of content. Does the same job as Specialize Type but it could be useful for batch updating. Thanks Marco
