System is adding using name automatically in Watchlist

Community Alums
Not applicable

Hi All,

I have an issue, when user raise an incident system is adding his name in watchlist 3 times instead of one time and system is sending same mails 2 times when he add additional comes. Could you please help how to resolve this issue.

 

Thanks!

 
 

 

24 REPLIES 24

Peter Bodelier
Giga Sage

Hi @Community Alums,

 

There will be some script which adds the user to the watchlist. Can you share that script with us?


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

Community Alums
Not applicable

Screenshot 2023-10-13 at 3.37.02 PM.pngScreenshot 2023-10-13 at 4.46.11 PM.pngScreenshot 2023-10-13 at 4.46.21 PM.png

Hi @Community Alums 

 

Use the last script as:

 

var watch_list = current.watch_list;
var current_user = gs.getUserID();

if (current.caller_id!=gs.getUserID()){
var new_watch_list = watch_list.split(',');
if (new_watch_list.indexOf(current_user) == -1){
new_watch_list.push(current_user);
}
current.watch_list = new_watch_list.join(',')

  You can use the same logic in your other script.


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

Anurag Tripathi
Mega Patron
Mega Patron

Ill start by checking the BRs , that run on insert.

-Anurag