cancel
Showing results for 
Search instead for 
Did you mean: 

Create MODEL Custom via Alfresco API

fagnersouza
Champ in-the-making
Champ in-the-making
I am building a web application which must have an option to create a data model with its types.

Does anyone know where has some example, code snippet or documentation to create a "MODEL" programmatically? I'm studying the source code of Alfresco Share to identify the way.

I appreciate any help.

Thanks

Fagner Souza
5 REPLIES 5

kaynezhang
World-Class Innovator
World-Class Innovator
Model is just xml file ,you can create xml files and use alfresco api to  place the files in the content repository under Company Home/Data Dictionary/Models

And to activate the model? Is there any example of this process?

Thanks

kamielvdz
Champ in-the-making
Champ in-the-making
An excellent add on that does this is: <a href="https://addons.alfresco.com/addons/alfresco-form-model-management">alfresco-form-model-management</a>

I looked at the source code but I was not very clear, know any other component that makes the creation of model that has code to query?

Thanks

kamielvdz
Champ in-the-making
Champ in-the-making
No, the only other way I know is like kaynezhang suggested. You can use e.g. the Javascript API to read the XML content of a model in  Company Home/Data Dictionary/Models, manipulate this with E4X coding and overwrite the content.