When will we use Run Script in Workflows

chanikya
Kilo Sage

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...

2 REPLIES 2

SanjivMeher
Kilo Patron
Kilo Patron

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.

Priyanka136
Mega Guru

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

find_real_file.png

www.dxsherpa.com