Monday, June 16, 2014

Change node type using Alfresco Javascript API?

How to change node type using Alfresco Javascript API?

Here are the steps to follow.

1) Find the node using search service
2) If the node is found then it return scriptnode.
3) Use the scriptnode instance and call specializeType method.


var nodeToChange= search.findNode("workspace://SpacesStore/d2403801-a467-4825-a0e0-c9f6c20bf934");
nodeToChange.specializeType("qt:customSite");
nodeToChange.save();

1 comment:

  1. Hi, I read your blog, it's very interesting about java scripts. And if someone else does not know, more detailed what is java https://explainjava.com/ you may read here. I was searched good article about that how it possible to make a snake game. And I did it. Nothing hard, you know.)

    ReplyDelete