cancel
Showing results for 
Search instead for 
Did you mean: 

Change Content Type via RepositoryService

martin
Champ in-the-making
Champ in-the-making
Hello,

Does anyone knows a way to change the content type after content creation with Repository WebService?

Thanks in advance

Martin
1 REPLY 1

openpj
Elite Collaborator
Elite Collaborator
You can specialize a node in a specific type using the specialize-type action.
This means that after the node creation, you need to use the ActionService exposed by the Web Services API of Alfresco.
Using the ActionService you can execute an action named "specialize-type".

Notice that you can specialize only in one direction for types.
This means that if you have a type customType1 that is defined with cm:content as parent, and a customType2 that has customType1 as parent, you can only specialize in the following direction:

cm:content -> customType1 -> customType2

But you can't specialize in the opposite direction, you can't return to the parent whenever you have a node specialized, you can only specialize in the children type direction.

Hope this helps.