<?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 to use scriptArgs in executeWebScript? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-use-scriptargs-in-executewebscript/m-p/7650#M3493</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David maybe the official JS-API documentation can help you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Alfresco/alfresco-js-api#custom-web-scripts-call" title="https://github.com/Alfresco/alfresco-js-api#custom-web-scripts-call" rel="nofollow noopener noreferrer"&gt;GitHub - Alfresco/alfresco-js-api: This project provides a JavaScript client API into the Alfresco REST API and Activiti…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Jun 2018 14:59:51 GMT</pubDate>
    <dc:creator>eugenio_romano</dc:creator>
    <dc:date>2018-06-28T14:59:51Z</dc:date>
    <item>
      <title>How to use scriptArgs in executeWebScript?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-use-scriptargs-in-executewebscript/m-p/7649#M3492</link>
      <description>Hey,I don't understand how to use scriptArgs in [AlfrescoApiService].getInstance().webScript.executeWebScript in ADF.I tried several ways,&amp;nbsp;even using a regular string, but none of them worked.I solved it for now by adding the args to tthe scriptPath and it works, but I wondered if someone&amp;nbsp;could expl</description>
      <pubDate>Thu, 28 Jun 2018 13:48:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-use-scriptargs-in-executewebscript/m-p/7649#M3492</guid>
      <dc:creator>d_moeyersons</dc:creator>
      <dc:date>2018-06-28T13:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to use scriptArgs in executeWebScript?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-use-scriptargs-in-executewebscript/m-p/7650#M3493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David maybe the official JS-API documentation can help you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Alfresco/alfresco-js-api#custom-web-scripts-call" title="https://github.com/Alfresco/alfresco-js-api#custom-web-scripts-call" rel="nofollow noopener noreferrer"&gt;GitHub - Alfresco/alfresco-js-api: This project provides a JavaScript client API into the Alfresco REST API and Activiti…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2018 14:59:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-use-scriptargs-in-executewebscript/m-p/7650#M3493</guid>
      <dc:creator>eugenio_romano</dc:creator>
      <dc:date>2018-06-28T14:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to use scriptArgs in executeWebScript?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-use-scriptargs-in-executewebscript/m-p/7651#M3494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eugenio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for answering.&lt;BR /&gt;The first thing that I have done was looking into the official documentation, I know where I should put the different parameters, but the exact format isn't defined there.&lt;BR /&gt;I already tried a flat string (in the example above it would be: "showAgendapunten=false") as third parameter, but I didn't get the desired results. I also tried an object, object Array, string Array as third parameter,&amp;nbsp;it all didn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2018 06:27:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-use-scriptargs-in-executewebscript/m-p/7651#M3494</guid>
      <dc:creator>d_moeyersons</dc:creator>
      <dc:date>2018-06-29T06:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to use scriptArgs in executeWebScript?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-use-scriptargs-in-executewebscript/m-p/7652#M3495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Inside the project, there is an index.d.ts that should help your IDE to understand the types. Maybe&amp;nbsp;your IDE is not configured in the riight&amp;nbsp;way. Anyway, this&amp;nbsp;the types:&amp;nbsp; :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE data-tab-size="4" style="color: #24292e; background-color: #ffffff;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="" style="color: #24292e; background-color: #fffbdd; padding: 0px 10px;"&gt;executeWebScript(&lt;SPAN class="" style="color: #e36209;"&gt;httpMethod&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;?&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;:&lt;/SPAN&gt; &lt;SPAN class="" style="color: #005cc5;"&gt;string&lt;/SPAN&gt;, &lt;SPAN class="" style="color: #e36209;"&gt;scriptPath&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;?&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;:&lt;/SPAN&gt; &lt;SPAN class="" style="color: #005cc5;"&gt;string&lt;/SPAN&gt;, &lt;SPAN class="" style="color: #e36209;"&gt;scriptArgs&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;?&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;:&lt;/SPAN&gt; &lt;SPAN class="" style="color: #005cc5;"&gt;any&lt;/SPAN&gt;, &lt;SPAN class="" style="color: #e36209;"&gt;contextRoot&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;?&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;:&lt;/SPAN&gt; &lt;SPAN class="" style="color: #005cc5;"&gt;string&lt;/SPAN&gt;, &lt;SPAN class="" style="color: #e36209;"&gt;servicePat&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;?&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;:&lt;/SPAN&gt; &lt;SPAN class="" style="color: #005cc5;"&gt;string&lt;/SPAN&gt;, &lt;SPAN class="" style="color: #e36209;"&gt;postBody&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;?&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;:&lt;/SPAN&gt; &lt;SPAN class="" style="color: #005cc5;"&gt;string&lt;/SPAN&gt;)&lt;SPAN class="" style="color: #d73a49;"&gt;:&lt;/SPAN&gt; &lt;SPAN class="" style="color: #6f42c1;"&gt;Promise&lt;/SPAN&gt;&amp;lt;{}&amp;gt;;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="" data-line-number="849" style="color: rgba(27, 31, 35, 0.3); padding: 0px 10px;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="color: #24292e; background-color: #ffffff;"&gt;It will compose an URL like that:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #24292e; background-color: #ffffff; font-weight: bold;"&gt;http(s)://(host):smileysad:port)/(contextPath)/(servicePath)/(scriptPath)?(&lt;/SPAN&gt;&lt;EM style="color: #24292e; background-color: rgba(255, 255, 140, 0.5); font-weight: 600; margin: 0px -2px; padding: 2px;"&gt;scriptArgs&lt;/EM&gt;&lt;SPAN style="color: #24292e; background-color: #ffffff; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #24292e; background-color: #ffffff;"&gt;scriptArgs&amp;nbsp;is an object like that:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;vat myParams &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;myUrlVar&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'value1'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;BR /&gt;myUrlVarTwo&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'value2'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So for example, if you use it:&lt;/P&gt;&lt;PRE class="language-javascript" style="color: #24292e; background-color: #f6f8fa; padding: 16px;"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;alfrescoJsApi&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;core&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;webscriptApi&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;executeWebScript&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'GET'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'mytasks'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; myParams&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'share'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'differentServiceSlug'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It should invoke&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="color: #24292e; background-color: #f6f8fa; padding: 16px;"&gt;&lt;SPAN class="" style="color: #032f62;"&gt;&lt;A class="jive-link-external-small" href="http://127.0.01:8080/share/differentServiceSlug/mytasks?myUrlVar=value1&amp;amp;myUrlVarTwo=value2" rel="nofollow noopener noreferrer" target="_blank"&gt;http://127.0.01:8080/share/differentServiceSlug/mytasks?myUrlVar=value1&amp;amp;myUrlVarTwo=value2&lt;/A&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2018 08:58:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-use-scriptargs-in-executewebscript/m-p/7652#M3495</guid>
      <dc:creator>eugenio_romano</dc:creator>
      <dc:date>2018-06-29T08:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to use scriptArgs in executeWebScript?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-use-scriptargs-in-executewebscript/m-p/7653#M3496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, this works.&lt;BR /&gt;My IDE (IntelliJ IDEA)&amp;nbsp;is configured the right way to show hints, but I couldn't make out what the 'any' type stands for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2018 09:37:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-use-scriptargs-in-executewebscript/m-p/7653#M3496</guid>
      <dc:creator>d_moeyersons</dc:creator>
      <dc:date>2018-06-29T09:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to use scriptArgs in executeWebScript?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-use-scriptargs-in-executewebscript/m-p/7654#M3497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yep maybe we have to improve that type definition, good point thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2018 13:12:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-use-scriptargs-in-executewebscript/m-p/7654#M3497</guid>
      <dc:creator>eugenio_romano</dc:creator>
      <dc:date>2018-06-29T13:12:55Z</dc:date>
    </item>
  </channel>
</rss>

