Need a on change client script to remove certain emails that are added to a watchlist

Priya2420
Tera Contributor

Hello!!

I need a On change client script to remove certain emails (for example high authority emails cannot be added to request by anyone , so emails like that ) from the watchlist while is is being added by the user while raising a request in SOW and  if a user tries to add one of them to the watch or worknotes list field at minimum inform them via a alert that it will not be read in and ideally actually removes the address from the field as well as informing the agent. 

 

Please do help me. 

Thank you.

2 REPLIES 2

Sandeep Rajput
Tera Patron
Tera Patron

@Priya2420 Instead of achieving this functionality through client script, you should define a reference qualifier on the watch list field. This reference qualifier should exclude the high authority users. For more information please refer to similar thread https://www.servicenow.com/community/developer-forum/how-can-i-restrict-the-watch-list-to-contacts-o...

 

Hope this helps.

Thank you so much for the reply sir, but according my company authorities they need a on change client script for removing the emails once added and giving an alert they have been removed because they don't have access.

I have discussed this reference qualifiers but they said this not work for the requirement.

Please help me with the client script code.

Thank you.