When will we use Run Script in Workflows
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2018 09:50 PM
Hi,
1.At what time we use Run script in Workflows
2. how can we use RunScript in workflows.
3. when we use Runscript in workflows................... Please give your comments .
Please Don't share Servicenow Wiki links, please provide your comments and examples...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2018 10:18 PM
If you want to perform some action which can't be done using non-scripted workflow activities, you can use a run script.
For ex, if you want to create an outage record from Change Management workflow, you can write a script which can do a gliderecord and insert a record into Outage table
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2018 10:55 PM
Hi chanikya,
The Run Script activity runs the specified script in the scope of the workflow version. All changes to current
are automatically updated. There is no need to call current.update() .
Run Script activity will be triggered at a specific point in the process, not any time the work notes change.
For Example :-
If you create one custom form and take the fields like state, short description, assignment group etc..
And the assignment group has two groups i.e Group 1, Group 2 and each group has 3 users...U1-U3,U4-U6...
when I submit the form the related task will automatically generated and assigned to different different users, at that time we use runscript instead of using create task activity in workflow.
Mark it correct or helpful, if it works...!!!
Warm Regards,
Priyanka
www.dxsherpa.com