- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 07:38 PM
Context: We created a catalog item with a user input field. We want to send an email notification to the email address entered by the user. Initially, we considered adding the entered email to the watchlist, since the watchlist can already be selected for notifications.
Do you have any other ideas for this? If using the watchlist is acceptable, how do we add the entered email variable to the watchlist?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 08:00 PM
you cannot add the email directly.
you can use the workaround to populate the watch list field
you can use after insert BR on RITM with this script and condition
current.cat_item.name == 'Your Catalog Item Name Here'
Script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
current.watch_list = current.variables.variableName;
current.setWorkflow(false);
current.update();
})(current, previous);
If you are using workflow then have run script and have this script
current.watch_list = current.variables.variableName;
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 08:00 PM
you cannot add the email directly.
you can use the workaround to populate the watch list field
you can use after insert BR on RITM with this script and condition
current.cat_item.name == 'Your Catalog Item Name Here'
Script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
current.watch_list = current.variables.variableName;
current.setWorkflow(false);
current.update();
})(current, previous);
If you are using workflow then have run script and have this script
current.watch_list = current.variables.variableName;
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 08:12 PM
Thanks Ankur!