Repeated name appear in watchlist selection field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi ,
While I am working on configuration of watchlist in incident form, i found my name is repeatedly coming under watchlist field.
Record producer script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Its not working when incident is getting created from portal and instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
yes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi @SoumyasreeP
If you have a script adding users to the watch list field in the Record Producer Script tab, update your script to prevent duplicating names and avoid adding yourself unnecessarily:
var currentWatchList = current.watch_list.toString();
var userId = gs.getUserID(); // take it from your variable if (currentWatchList.indexOf(userId) == -1) { if (currentWatchList == '') { current.watch_list = userId; } else { current.watch_list = currentWatchList + ',' + userId; } }
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
No its not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @SoumyasreeP
Add log and debug it - which line not working.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti