Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2023 11:57 PM
Hello Experts,
current caller email id is not allowed to add in the watch list in incident form in ServiceNow. How to achieved ?
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 12:04 AM
Hi @Rajveer
Try the following before business rule.
(function executeRule(current, previous /*null when async*/) {
var watch_list_users = current.getValue('watch_list') + '';
if(watch_list_users.indexOf(current.caller_id) != -1){
current.setAbortAction(true);
gs.addErrorMessage("Caller can not be in watch list users.");
}
})(current, previous);
Please mark my answer helpful and accept as solution if it helped you 👍✔️
Thanks,
Anvesh
Anvesh
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 12:04 AM
Hi @Rajveer
Try the following before business rule.
(function executeRule(current, previous /*null when async*/) {
var watch_list_users = current.getValue('watch_list') + '';
if(watch_list_users.indexOf(current.caller_id) != -1){
current.setAbortAction(true);
gs.addErrorMessage("Caller can not be in watch list users.");
}
})(current, previous);
Please mark my answer helpful and accept as solution if it helped you 👍✔️
Thanks,
Anvesh
Anvesh