<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Updating document properties once the folder is updated in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/updating-document-properties-once-the-folder-is-updated/m-p/25975#M11259</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SOLVED !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Found the script to iterate through a node and its childs here: &lt;A _jive_internal="true" href="https://community.alfresco.com/docs/DOC-5716-iterate-nodes" rel="nofollow noopener noreferrer"&gt;https://community.alfresco.com/docs/DOC-5716-iterate-nodes&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Found a comment about the possibility to run a script stored in the Repository/Scripts folder. This option is missing from 5&lt;/P&gt;&lt;P&gt;.2, so we modified the config file to allow this.&lt;/P&gt;&lt;P&gt;Then, modified the iterating script to&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;get the properties of the node on which the action is run,&lt;/LI&gt;&lt;LI&gt;iterate through all child nodes&lt;/LI&gt;&lt;LI&gt;check the type of each child&lt;/LI&gt;&lt;LI&gt;if the type is set to a predefined one - this one is done via a rule applied on the folder when the user is uploading the document - then update the properties of the document with the ones from the folder&lt;/LI&gt;&lt;LI&gt;save the document&lt;/LI&gt;&lt;LI&gt;write a log file&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zsolt Putnoky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 May 2017 12:49:52 GMT</pubDate>
    <dc:creator>zputnoky</dc:creator>
    <dc:date>2017-05-30T12:49:52Z</dc:date>
    <item>
      <title>Updating document properties once the folder is updated</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/updating-document-properties-once-the-folder-is-updated/m-p/25972#M11256</link>
      <description>Dear All,In our test case, we got the following demand&lt;IMG id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;ocuments are stored in specific folders.Most of the document custom properties are managed on folder level in order to limit the update to be done by the user. Bascially we write the custom property value on the folder level at creation, then c</description>
      <pubDate>Mon, 29 May 2017 09:44:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/updating-document-properties-once-the-folder-is-updated/m-p/25972#M11256</guid>
      <dc:creator>zputnoky</dc:creator>
      <dc:date>2017-05-29T09:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: Updating document properties once the folder is updated</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/updating-document-properties-once-the-folder-is-updated/m-p/25973#M11257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Zsolt, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This shouldn't be very complicated. Could you share your code base? Or at least say which API you are using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2017 18:18:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/updating-document-properties-once-the-folder-is-updated/m-p/25973#M11257</guid>
      <dc:creator>gluck113</dc:creator>
      <dc:date>2017-05-29T18:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Updating document properties once the folder is updated</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/updating-document-properties-once-the-folder-is-updated/m-p/25974#M11258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Simon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, here is the trick, I do not have any codebase. Honestly telling you, I have no idea where to start.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks alot,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zsolt Putnoky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 06:42:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/updating-document-properties-once-the-folder-is-updated/m-p/25974#M11258</guid>
      <dc:creator>zputnoky</dc:creator>
      <dc:date>2017-05-30T06:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Updating document properties once the folder is updated</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/updating-document-properties-once-the-folder-is-updated/m-p/25975#M11259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SOLVED !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Found the script to iterate through a node and its childs here: &lt;A _jive_internal="true" href="https://community.alfresco.com/docs/DOC-5716-iterate-nodes" rel="nofollow noopener noreferrer"&gt;https://community.alfresco.com/docs/DOC-5716-iterate-nodes&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Found a comment about the possibility to run a script stored in the Repository/Scripts folder. This option is missing from 5&lt;/P&gt;&lt;P&gt;.2, so we modified the config file to allow this.&lt;/P&gt;&lt;P&gt;Then, modified the iterating script to&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;get the properties of the node on which the action is run,&lt;/LI&gt;&lt;LI&gt;iterate through all child nodes&lt;/LI&gt;&lt;LI&gt;check the type of each child&lt;/LI&gt;&lt;LI&gt;if the type is set to a predefined one - this one is done via a rule applied on the folder when the user is uploading the document - then update the properties of the document with the ones from the folder&lt;/LI&gt;&lt;LI&gt;save the document&lt;/LI&gt;&lt;LI&gt;write a log file&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zsolt Putnoky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 12:49:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/updating-document-properties-once-the-folder-is-updated/m-p/25975#M11259</guid>
      <dc:creator>zputnoky</dc:creator>
      <dc:date>2017-05-30T12:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Updating document properties once the folder is updated</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/updating-document-properties-once-the-folder-is-updated/m-p/25976#M11260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad you sorted it out. Thanks for coming back to let us know!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 17:21:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/updating-document-properties-once-the-folder-is-updated/m-p/25976#M11260</guid>
      <dc:creator>kgastaldo</dc:creator>
      <dc:date>2017-05-30T17:21:52Z</dc:date>
    </item>
  </channel>
</rss>

