How to write Run script in workflow to get the task assign to user

manasa32
Tera Contributor

I have requirement 75% SLA breached notifications do not send to particular person if he is assigned to person also.

for this I wrote run script to restrict it but notification is not sending 

Can any one tell the what are the mistakes I did in scripting.find_real_file.png

find_real_file.png

find_real_file.png

4 REPLIES 4

Abhinay1
Giga Expert

Hello Manasa,

In your 3rd screenshot, modify the 'if condition' and put yes in quotes like 'yes'

if(assignedTo == ' yes')

{

Regards,

Abhinay

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you are comparing with variable yes in line 4

but it should be string 'yes'

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@manasa 

Hope you are doing good.

Did my reply answer your question?

If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Muhammad Khan
Mega Sage
Mega Sage

Hi,

Adding one more thing, replace

answer.push(assignedTo);

With

answer.push(current.task.assigned_to);