Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to add the Requested By user into SC_Task watch list by using workflow script

Rajesh Bandila
Tera Contributor

Hi,

 

I have created the workflow with two create task activity. Now I want to autopopulate watchlist with the Requested_By user name on Task 1. How to achieve this By using workflow script?

 

Thanks in Advance,

Rajesh Bandila

1 ACCEPTED SOLUTION

Ramesh_Naidu
Mega Guru

Hi @Rajesh Bandila,

 

In the Workflow Create Task activity you can script by checking the Advanced checkbox. Attached an example

Ramesh_Naidu_0-1710785869225.png

Thankyou.

 

View solution in original post

4 REPLIES 4

SanjivMeher
Mega Patron
Mega Patron

in the Create Task activity itself you can add script

ex. task.watch_list = current.<requested by field name>;


Please mark this response as correct or helpful if it assisted you with your question.

Ramesh_Naidu
Mega Guru

Hi @Rajesh Bandila,

 

In the Workflow Create Task activity you can script by checking the Advanced checkbox. Attached an example

Ramesh_Naidu_0-1710785869225.png

Thankyou.

 

Thanks @Ramesh_Naidu

 

I have tried the above line of script on create task activity, but it's not working as expected.

Hi @Ramesh_Naidu 

 

Thanks, the given line of code is working correctly on Workflow activity. I have given the wrong back end filed value earlier.

Regards,

Rajesh Bandila