Dear All,
In our test case, we got the following demand:
The above work well at document creation. However, during the process, some of the folder level properties are updated. The new values should be pushed down to all documents present in that folder.
The idea would be to get the ID of the folder, then check all child objects belonging to the selected folder and update the properties.
Does any one of you know how to do this?
Thanks alot for your help,
Zsolt Putnoky
Solved! Go to Solution.
SOLVED !!
Here is the solution:
Found the script to iterate through a node and its childs here: https://community.alfresco.com/docs/DOC-5716-iterate-nodes
Found a comment about the possibility to run a script stored in the Repository/Scripts folder. This option is missing from 5
.2, so we modified the config file to allow this.
Then, modified the iterating script to
Zsolt Putnoky
Hello Zsolt,
This shouldn't be very complicated. Could you share your code base? Or at least say which API you are using.
The concept is that you get all Children NodeRefs from your folder NodeRef. Then maybe you'll need to be recursive depending on the level you want to obtain.
Best regards
Hi Simon,
Now, here is the trick, I do not have any codebase. Honestly telling you, I have no idea where to start.
So far with the help of this forum and google we managed to create the templates, modify the view, search, start up email and LDAP, etc. And reached a roadblock with the issue I mentioned. In our case, we use the folder as a container, each document in a folder belongs to the same 'object', hence it should inherit all the properti values set on the folder level. With rules and JS this is okay when the user uploads the documents into the folder. However at a certain stage in our process, the folder properties are updated and this update shall be sent down to the documents.
Do you know where I can find documentation about the different APIs? to know how to get the ID of the selected folder? and check all child objects? that would be a great help already.
Thanks alot,
Zsolt Putnoky
SOLVED !!
Here is the solution:
Found the script to iterate through a node and its childs here: https://community.alfresco.com/docs/DOC-5716-iterate-nodes
Found a comment about the possibility to run a script stored in the Repository/Scripts folder. This option is missing from 5
.2, so we modified the config file to allow this.
Then, modified the iterating script to
Zsolt Putnoky
Glad you sorted it out. Thanks for coming back to let us know!
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.