- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2018 12:23 PM
Hi,
I am hoping someone can assist me. I am having a problem with the Advanced Script in the Workflow Notification. I have to send a notification also to the user on the catalog form variable field. The user is in a reference field, I have tried several things, but it seems to only send an email to the 2nd email after the comma (acessrites@test.com).
I have tried different approaches, but to no avail.
answer = (current.variable_pool.st_employeename.email);
Am I missing something?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2018 12:46 PM
To understand why its not working, you need to know how recipients list works for the emails in ServiceNow. A recipient list will be filtered for valid email addresses before sending an email.
So your recipient list according to your code is
So your code should be something like this below
answer= current.variables.st_employeeemail.email+",acessrites@test.com";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2018 01:34 PM
Thank you! The notification is just a one-time notification. The recipient is just sent it once to notify them that a user is going on leave of absence.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2018 01:51 PM
You are welcome. I just make a habit of never doing it right in the Workflow.