<?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: Javascript Rule Delete Node in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/javascript-rule-delete-node/m-p/17434#M7712</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure if this is also true for folder rules, as I have never tried to do what you are trying, but I know that when you are using behaviours, you have to use another approach, as described in this blog post&amp;nbsp;&lt;A class="link-titled" href="https://angelborroy.wordpress.com/2015/05/22/alfresco-implementing-delete-behavior/" title="https://angelborroy.wordpress.com/2015/05/22/alfresco-implementing-delete-behavior/" rel="nofollow noopener noreferrer"&gt;Alfresco – Implementing delete behavior | Programming and So&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The use case is basically the same, but using Java code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Sep 2017 20:39:43 GMT</pubDate>
    <dc:creator>douglascrp</dc:creator>
    <dc:date>2017-09-27T20:39:43Z</dc:date>
    <item>
      <title>Javascript Rule Delete Node</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/javascript-rule-delete-node/m-p/17431#M7709</link>
      <description>Issue&amp;nbsp;with javscript that removes another node when a node is deleted.function main() {&amp;nbsp; &amp;nbsp; &amp;nbsp; var parent = space.parent;&amp;nbsp; &amp;nbsp; &amp;nbsp; var parentOfParent = parent.parent;&amp;nbsp; &amp;nbsp; &amp;nbsp; var staffnetFolder = companyhome.childByNamePath("Shared/Staffnet/" + parentOfParent.name + "/" + parent.name);&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;var pdf = staffne</description>
      <pubDate>Wed, 27 Sep 2017 16:35:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/javascript-rule-delete-node/m-p/17431#M7709</guid>
      <dc:creator>strugglingdev</dc:creator>
      <dc:date>2017-09-27T16:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript Rule Delete Node</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/javascript-rule-delete-node/m-p/17432#M7710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you sure you are getting the right "other" document?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to print the noderef for both &lt;STRONG&gt;document&lt;/STRONG&gt; (the one you are deleting) and &lt;STRONG&gt;pdf&lt;/STRONG&gt; (the one you are trying to delete in response of the first one) objects.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Sep 2017 20:16:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/javascript-rule-delete-node/m-p/17432#M7710</guid>
      <dc:creator>douglascrp</dc:creator>
      <dc:date>2017-09-27T20:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript Rule Delete Node</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/javascript-rule-delete-node/m-p/17433#M7711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I output the two nodeRefs they are what they should be. When I try to use the code in another action (such as an update rule) it works and deletes the PDF. It just seems to be the delete action that is causing this problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Sep 2017 20:30:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/javascript-rule-delete-node/m-p/17433#M7711</guid>
      <dc:creator>strugglingdev</dc:creator>
      <dc:date>2017-09-27T20:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript Rule Delete Node</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/javascript-rule-delete-node/m-p/17434#M7712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure if this is also true for folder rules, as I have never tried to do what you are trying, but I know that when you are using behaviours, you have to use another approach, as described in this blog post&amp;nbsp;&lt;A class="link-titled" href="https://angelborroy.wordpress.com/2015/05/22/alfresco-implementing-delete-behavior/" title="https://angelborroy.wordpress.com/2015/05/22/alfresco-implementing-delete-behavior/" rel="nofollow noopener noreferrer"&gt;Alfresco – Implementing delete behavior | Programming and So&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The use case is basically the same, but using Java code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Sep 2017 20:39:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/javascript-rule-delete-node/m-p/17434#M7712</guid>
      <dc:creator>douglascrp</dc:creator>
      <dc:date>2017-09-27T20:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript Rule Delete Node</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/javascript-rule-delete-node/m-p/17435#M7713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Douglas - sorry if I'm misunderstanding. So you're saying that I should look into developing behaviours instead of putting the action as a rule and use this transactional logic? Or am I able to implement transactional logic in rule scripts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Sep 2017 20:55:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/javascript-rule-delete-node/m-p/17435#M7713</guid>
      <dc:creator>strugglingdev</dc:creator>
      <dc:date>2017-09-27T20:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript Rule Delete Node</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/javascript-rule-delete-node/m-p/17436#M7714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe that would be the right thing to do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Sep 2017 21:29:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/javascript-rule-delete-node/m-p/17436#M7714</guid>
      <dc:creator>douglascrp</dc:creator>
      <dc:date>2017-09-27T21:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript Rule Delete Node</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/javascript-rule-delete-node/m-p/17437#M7715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this is caused by „retriggering“ the delete rule with pdf.remove()?&lt;/P&gt;&lt;P&gt;But I can‘t see from your question if the staffnet folder is also in the range of your delete rule...&lt;/P&gt;&lt;P&gt;I'm not sure if you get what you want with using "space", maybe document.parent - but that depends were your rule is anchored and if it's trigger in sub-spaces (the whole tree)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2018 12:27:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/javascript-rule-delete-node/m-p/17437#M7715</guid>
      <dc:creator>mehe</dc:creator>
      <dc:date>2018-05-10T12:27:14Z</dc:date>
    </item>
  </channel>
</rss>

