Auto populate RITM watchlist

soumya17
Tera Contributor

Hello ,

 

I want to copy user(reference field to user table) to ritm watchlist on submitting request.

I have referred https://www.servicenow.com/community/it-service-management-forum/auto-add-to-watchlist/m-p/914649/pa...

but i get org.mozilla.javascript.NativeArray@c8b0cc in watchlist

 

 

Please help me to fix this.

 

Thanks

Soumya

2 ACCEPTED SOLUTIONS

Abhijit4
Mega Sage

Try adding toString() at the end, as shown below. Most of the time it works.

 

current.watch_list = current.variables.person_to_be_copied.toString();

 

Mark answer as Correct or Helpful based on impact.

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP

View solution in original post

Hi @soumya17,

Try this updated lines in your business rule. It will work.

 

current.watch_list = current.variables.person_to_be_copied.toString();

current.update();

 

Thanks,
Sagar Pagar

The world works with ServiceNow

View solution in original post

14 REPLIES 14

soumya17
Tera Contributor

I wrote business rule after->insert on ritm table

Abhijit4
Mega Sage

Try adding toString() at the end, as shown below. Most of the time it works.

 

current.watch_list = current.variables.person_to_be_copied.toString();

 

Mark answer as Correct or Helpful based on impact.

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP

No 😞  @Abhijit4

 

It actually worked isn’t it. Just you didn’t add current.update() in after BR

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP

yes update i didnt add. 

It worked.. Thankyou