Questions about createNode

10 views
Skip to first unread message

Yusén Manchego

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

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

unread,
Feb 20, 2018, 10:20:04 AM2/20/18
to alfresco-techn...@googlegroups.com
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.

Jeff
--
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 alfresco-technical-d...@googlegroups.com.
To post to this group, send email to alfresco-techn...@googlegroups.com.
Visit this group at https://groups.google.com/group/alfresco-technical-discussion.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages