How to write Run script in workflow to get the task assign to user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-01-2022 06:26 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-01-2022 07:43 AM
Hello Manasa,
In your 3rd screenshot, modify the 'if condition' and put yes in quotes like 'yes'
if(assignedTo == ' yes')
{
Regards,
Abhinay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-01-2022 07:45 AM
Hi,
you are comparing with variable yes in line 4
but it should be string 'yes'
Regards
Ankur
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-20-2022 02:31 AM
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
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-01-2022 07:56 AM
Hi,
Adding one more thing, replace
answer.push(assignedTo);
With
answer.push(current.task.assigned_to);