04-06-2007 10:50 AM
<config>
<actions>
<action id="myAction">
<label>My Action</label>
<image>/images/icons/submit.gif</image>
<script>/Company Home/Data Dictionary/Scripts/myScript.js</script>
</action>
</actions>
</config>
org.alfresco.error.AlfrescoRuntimeException: Error during command servlet processing: Failed to execute script 'workspace://SpacesStore/94d58aac-e3c0-11db-8f3d-abe0b2708ac6': ReferenceError: "document" is not defined. (AlfrescoScript#21)
04-20-2007 05:07 AM
When I go to run the script on a document, I get the following error:org.alfresco.error.AlfrescoRuntimeException: Error during command servlet processing: Failed to execute script 'workspace://SpacesStore/94d58aac-e3c0-11db-8f3d-abe0b2708ac6': ReferenceError: "document" is not defined. (AlfrescoScript#21)
Looking up that node uuid, I'm surprised to see it's referring to the node for the javascript file rather than the document I ran the action on. I was under the impression from the Javascript wiki article that the document object would be automatically set to the node I ran the action on, without requiring additional parameters from me.
<config>
<actions>
<action id="myAction">
<label>My Action</label>
<image>/images/icons/submit.gif</image>
<script>/Company Home/Data Dictionary/Scripts/myScript.js</script>
<params>
<param name="id">#{actionContext.id}</param>
</params>
</action>
</actions>
</config>
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.