Skip to content

Instantly share code, notes, and snippets.

@nancystodd
Created August 29, 2018 18:11
Show Gist options
  • Save nancystodd/5098e86fc55e8c160eaa0e14dad41058 to your computer and use it in GitHub Desktop.
Save nancystodd/5098e86fc55e8c160eaa0e14dad41058 to your computer and use it in GitHub Desktop.
ServiceNow - Get a Workflow by Name
/**
* Get a Workflow by Name
* After dealing with how to find the correct sys_id for a workflow
* to use in a script, I found this snippet that made hard coding the
* sys_id a thing of the past.
*/
var wf = new Workflow();
wfId = wf.getWorkflowFromName('NAME OF WORKFLOW'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment