AnsweredAssumed Answered

Change type using API

Question asked by vikrantkorde on Jan 19, 2016
Latest reply on Jan 19, 2016 by vikrantkorde
Hi Experts,

I have created a custom type as below

<type name="my:ins">
         <title>Insurance documents</title>
            <property name="my:maturityDate">
            <property name="my:insuranceNumber">
            <property name="my:beneficiaryName">
            <property name="my:sumAssured">

In file /u01/AlfrescoDMS/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml file this type is associated to cm:content as below
         <type name="cm:content">
         <subtype name="my:ins" />

When i go to Details page for any file and click on "Change Type" link from right side of page (Image attached) I can see the type as "type.my_ins". If i select this type and click on OK then it shows success message and also the properties which i have added in the respective model.xml file, are visible in "Edit Properties" page.

So i believe the changes i have made to add additional properties are working fine. The question is when i add new file in the repository i want to change the type of that file to "type.my_ins" through API and then i also want to set the values in those additional properties. How can i do that?

Vikrant Korde