How to update a user related list record when a watch list external user gets added or removed

IB98
Giga Sage

Hello,

is there a way to update a sn_customerservice_related_party related list record when the external users get added/ removed from a sn_customerservice_case watch list ? Thank you!

10 REPLIES 10

thanks on the reply but the code did not work. maybe it is from my end. 

@IB98 

what's the name of watch list field on "sn_customerservice_related_party"?

you should replace that correctly in the script I shared and then test.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

the sn_customerservice_case has the watch_list list collector field and for every user added/removed from it, we need to create/remove a record from the sn_customerservice_related_party table. So, thecnically, everything in the watchlist field needs to be a record on the sn_customerservice_related_party table. 

@IB98 

I got your requirement but the script I shared, you need to use the correct watch list field on sn_customerservice_related_party table

I couldn't find that field on that table and I believe it's a custom one.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

I think you might be misunderstanding. The watch_list field is on the sn_customerservice_case table. For every user in the watchlist field, a record needs to be created/removed on the sn_customerservice_related_party table. sn_customerservice_related_party table does not have a watch_list field because it will be a set of records (for every user in the watchlist field on the sn_customerservice_case table)