<?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: How can I execute a Java script before creating new content in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-can-i-execute-a-java-script-before-creating-new-content/m-p/52337#M19749</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp;Pitsinis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can't you create a custom action on folder level instead a new item in the create menu? I think it would be a more accurated solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway you could try to overwrite the url for content creation in the definition of the creation form of your type..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;config evaluator&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"model-type"&lt;/SPAN&gt; condition&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"wscm:sociedad"&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;    &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;forms&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;       &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;form submission&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;url&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"&amp;lt;your web script url&amp;gt;"&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use property&amp;nbsp;submission-url to modify the web script to handle the creation of the content and implement in this web script all your custom logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you want to take a look of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://docs.alfresco.com/community/references/dev-extension-points-form-processors.html" rel="nofollow noopener noreferrer"&gt;http://docs.alfresco.com/community/references/dev-extension-points-form-processors.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Mar 2019 15:27:52 GMT</pubDate>
    <dc:creator>roberto_gamiz</dc:creator>
    <dc:date>2019-03-14T15:27:52Z</dc:date>
    <item>
      <title>How can I execute a Java script before creating new content</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-can-i-execute-a-java-script-before-creating-new-content/m-p/52336#M19748</link>
      <description>I want to execute a Java script on content creation. The script should fetch a document from a url, given some parameters on a popup (same as the folder creation popup) and then upload it to alfresco.I have followed the instructions here Adding a menu item to the "Create..." menu in DocLib | Alfresc</description>
      <pubDate>Thu, 14 Mar 2019 13:43:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-can-i-execute-a-java-script-before-creating-new-content/m-p/52336#M19748</guid>
      <dc:creator>hackerkok</dc:creator>
      <dc:date>2019-03-14T13:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: How can I execute a Java script before creating new content</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-can-i-execute-a-java-script-before-creating-new-content/m-p/52337#M19749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp;Pitsinis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can't you create a custom action on folder level instead a new item in the create menu? I think it would be a more accurated solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway you could try to overwrite the url for content creation in the definition of the creation form of your type..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;config evaluator&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"model-type"&lt;/SPAN&gt; condition&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"wscm:sociedad"&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;    &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;forms&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;       &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;form submission&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;url&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"&amp;lt;your web script url&amp;gt;"&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use property&amp;nbsp;submission-url to modify the web script to handle the creation of the content and implement in this web script all your custom logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you want to take a look of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://docs.alfresco.com/community/references/dev-extension-points-form-processors.html" rel="nofollow noopener noreferrer"&gt;http://docs.alfresco.com/community/references/dev-extension-points-form-processors.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2019 15:27:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-can-i-execute-a-java-script-before-creating-new-content/m-p/52337#M19749</guid>
      <dc:creator>roberto_gamiz</dc:creator>
      <dc:date>2019-03-14T15:27:52Z</dc:date>
    </item>
  </channel>
</rss>

