Email notification based on record producer variable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2020 03:52 AM
Hi All,
I currently have various record producers set up, when completed, an email notification is sent to specific emails with the input of all variables within the record producer.
This is set up via an event, a business rule and a notification all within a custom application - this is working great!
However, I am trying to configure another notification based on the input of one of the variables within the record producer i.e -
If variable 'Team Leader' is 'Joe Bloggs' then send this email notification to 'Joe Bloggs'.
Everything I have tried so far is not sending one.
Does anyone have any ideas on how to achieve this?
Thank you,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2020 04:42 AM
Hi Ankur,
Target table would be 'x_polo_forms_requests'.
Please advise further.
Thanks,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2020 05:12 AM
Hi,
update as below
1) your event and notification should be x_polo_forms_requests table
You just need to use script I shared
Ensure you use valid variable name and value for comparing
(function executeRule(current, previous /*null when async*/) {
// Add your code here
if(current.variables.teamLeader.name == 'Joe Bloggs'){
gs.eventQueue('event_name', current, current.variables.teamLeader.email, '');
}
})(current, previous);
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
‎12-01-2020 02:43 AM
Hi Ankur,
The Team Leader Variable is a select box with manual entries for the Team Leader names.
Can the specific email address of the team leader be added to the script?
As due to it being a select box, I don't think the 'team_leader.email' function would work.
OR
Can it look for the 'who will receive' within the email notification?
I'm thinking I would have to set up a separate event, business rule and notification for each team leader?
You are currently helping me with a different approach here.
Thanks,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2020 03:07 AM
Hi,
As mentioned in my comment for this you will require separate event and notification etc
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
‎04-19-2021 05:48 AM
Thanks for marking my response as helpful.
Did my reply answer your question?
If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.
Thanks!
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader