<?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: CIFS desktopactions - ScriptAction.execute error in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/cifs-desktopactions-scriptaction-execute-error/m-p/52421#M30792</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Kevin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately, the 'search' object is not available to the jscript desktop action, looks like it is only available to the jscript actions in the Web Client maybe? I see it in the Javascript API on the wiki, but it is not &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Desktop_Actions#Writing_A_Javascript_Desktop_Action" rel="nofollow noopener noreferrer"&gt;Javascript Desktop Action&lt;/A&gt;&lt;SPAN&gt;. I get an error when trying to access it also.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In any event, for my particular situation I found a better way to handle the converting of the content, that was to just use a rule with the specialise-type option: &lt;/SPAN&gt;&lt;A href="http://forums.alfresco.com/viewtopic.php?t=2527&amp;amp;highlight=specialise" rel="nofollow noopener noreferrer"&gt;http://forums.alfresco.com/viewtopic.php?t=2527&amp;amp;highlight=specialise&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Nov 2006 16:53:09 GMT</pubDate>
    <dc:creator>darcy</dc:creator>
    <dc:date>2006-11-29T16:53:09Z</dc:date>
    <item>
      <title>CIFS desktopactions - ScriptAction.execute error</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cifs-desktopactions-scriptaction-execute-error/m-p/52417#M30788</link>
      <description>Hello all,I am using Alfresco 1.4.0 community. I am having trouble running a desktop action in order to change the content type to a custom type when importing via CIFS. I am not sure I understand correctly how to do it. Here is what I have:in file-servers-custom.xml:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;action&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;</description>
      <pubDate>Tue, 28 Nov 2006 03:22:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cifs-desktopactions-scriptaction-execute-error/m-p/52417#M30788</guid>
      <dc:creator>darcy</dc:creator>
      <dc:date>2006-11-28T03:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: CIFS desktopactions - ScriptAction.execute error</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cifs-desktopactions-scriptaction-execute-error/m-p/52418#M30789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;no one has any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2006 14:13:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cifs-desktopactions-scriptaction-execute-error/m-p/52418#M30789</guid>
      <dc:creator>darcy</dc:creator>
      <dc:date>2006-11-29T14:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: CIFS desktopactions - ScriptAction.execute error</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cifs-desktopactions-scriptaction-execute-error/m-p/52419#M30790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The problem here is the deskParams.getTarget(0).getNode() parameter. You are correct that the Repository action API for that particular action expects a NodeRef - but the JavaScript API world deals in wrapper objects - it does not work with NodeRef instances directly. So the JavaScript 'actions' object is expecting a JavaScript Node object as the action parameter - not a NodeRef.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The workaround is to use the JavaScript 'search' object to find the node represented by the NodeRef and wrap it into the expected Node object:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;function runAction()&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; var script = actions.create("specialise-type");&lt;BR /&gt;&amp;nbsp;&amp;nbsp; script.parameters["type-name"] = "tcs:content";&lt;BR /&gt;&amp;nbsp;&amp;nbsp; var node = search.findNode(deskParams.getTarget(0).getNode());&lt;BR /&gt;&amp;nbsp;&amp;nbsp; script.execute(node);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;runAction();&lt;BR /&gt;var response = "0,Javascript completed successfully";&lt;BR /&gt;response;&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;/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;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;I think that should work &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As far as fixing the issue - we need to either fix the jscript desktop actions objects to correctly wrap NodeRef as Node objects - or change the JavaScript 'actions' object to handle NodeRef parameters.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2006 15:20:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cifs-desktopactions-scriptaction-execute-error/m-p/52419#M30790</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2006-11-29T15:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: CIFS desktopactions - ScriptAction.execute error</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cifs-desktopactions-scriptaction-execute-error/m-p/52420#M30791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have raised a JIRA task for this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://issues.alfresco.com/browse/AR-1121" rel="nofollow noopener noreferrer"&gt;http://issues.alfresco.com/browse/AR-1121&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2006 15:25:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cifs-desktopactions-scriptaction-execute-error/m-p/52420#M30791</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2006-11-29T15:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: CIFS desktopactions - ScriptAction.execute error</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cifs-desktopactions-scriptaction-execute-error/m-p/52421#M30792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Kevin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately, the 'search' object is not available to the jscript desktop action, looks like it is only available to the jscript actions in the Web Client maybe? I see it in the Javascript API on the wiki, but it is not &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Desktop_Actions#Writing_A_Javascript_Desktop_Action" rel="nofollow noopener noreferrer"&gt;Javascript Desktop Action&lt;/A&gt;&lt;SPAN&gt;. I get an error when trying to access it also.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In any event, for my particular situation I found a better way to handle the converting of the content, that was to just use a rule with the specialise-type option: &lt;/SPAN&gt;&lt;A href="http://forums.alfresco.com/viewtopic.php?t=2527&amp;amp;highlight=specialise" rel="nofollow noopener noreferrer"&gt;http://forums.alfresco.com/viewtopic.php?t=2527&amp;amp;highlight=specialise&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2006 16:53:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cifs-desktopactions-scriptaction-execute-error/m-p/52421#M30792</guid>
      <dc:creator>darcy</dc:creator>
      <dc:date>2006-11-29T16:53:09Z</dc:date>
    </item>
  </channel>
</rss>

