For Global Application use the following script
onclik: showWorkflowContext()
condition: !current.isNewRecord() && (new Workflow().hasWorkflow(current))
function showWorkflowContext() {
var id = g_form.getUniqueValue().toString();
var url = new GlideURL('context_workflow.do');
url.addParam('sysparm_stack', 'no');
url.addParam('sysparm_table', g_form.getTableName());
url.addParam('sysparm_document', id);
g_navigation.open(url.getURL(), "_blank")
}
For Scoped Application use the following script
onclik: showWorkflowContext()
condition: !current.isNewRecord() && (new global.Workflow().hasWorkflow(current))
Script: Same as above
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.