I know I'm dominating these boards lately, but I'm still seeing some very bizarre behavior (which I'm sure is just a byproduct of not understanding the application framework fully).Right now, I have a script action showing up in the document_browse and doc_details_actions action groups. The action is defined as follows: <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>
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.So are parameters required from me? Which parameters do I need to provide? I tried actionContext.id, but that's also the uuid for the script node. Any help is appreciated. Thanks.