Questions about createNode

Skip to first unread message

Yusén Manchego

Feb 20, 2018, 8:59:00 AM2/20/18
to Alfresco Technical Discussion

I have created a type that inherits from cm: object to save a list of fruits, I create a node of this type (for example an apple) and I add it as a son of CompanyHome
nodeService.createNode (CompanyHome, "banana", "my: fruit")

According to the documentation CompanyHome is the primary father then:
 - How could your primary parent change to a node?
 - Is it ok to add the node to companyHome? since the type "my: fruit" is used for a combobox and logically it should not have a parent node since it is for the whole system but the createNode method requires a parent.
 - How can I make a transaction within a WebScript function without using <transaction> required </ transaction>

Thank you very much in advance

Jeff Potts

Feb 20, 2018, 10:20:04 AM2/20/18
There is only one node in the system that does not have a parent and that is the root node.

I would not put objects like that in company home but would instead create a folder to hold them either off of company home or in the Data Dictionary.

In general, you should not try to do your own transaction handling but instead should configure the web script appropriately and let alfresco handle it.

You received this message because you are subscribed to the Google Groups "Alfresco Technical Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit
Reply all
Reply to author
0 new messages