workflow variables: see https://docs.servicenow.com/bundle/paris-servicenow-platform/page/administer/using-workflows/concept/c_UsingVariablesInAWorkflow.html
trigger a workflow and pass in variables:
var vars = {
assignment_group:[
{ "sys_id":"deddc3991bf2a490f0dc85e4464bxxxx", "name":"Incident Managers Group"}
]};
//gs.print(vars.assignment_group[0].sys_id+"");
//gs.print(JSON.stringify(vars.assignment_group[0].sys_id));
var wflw = new global.Workflow();
wflw.startFlow(wflw.getWorkflowFromName('give the workflow name'), current, vars);
access the variables from within the workflow script:
workflow.scratchpad.assignment_group = vars.assignment_group.sys_id + "";
Comments
Post a Comment