AnsweredAssumed Answered

Execute a custom javascript in workflow-form.js

Question asked by rubiecasana on Oct 9, 2012
Latest reply on Oct 12, 2012 by rubiecasana
I tried to create custom script that I want to call if the workflow status is complete. In the workflow-form.js, I am already able to know the status of the workflow. So I created an if statement that executes the script below. But it's not working. (Note: the script below is working when run in the javascript  console)

var nodeId =;

var url = encodeURIComponent(document.nodeRef);
//nodeId = "ee9e3698-f6f7-438f-8f58-1015e37c7fc9";
var theDocument = search.findNode("workspace://SpacesStore/" + nodeId);

var cats =["cm:categories"];
var summary =["cm:summary"];["cm:summary"] = "Approved";
//var summary =["cm:summary"];;

Anyone's help is very much appreciated.