Unable to add members to watchlist of RITM from flow designer

Abhishek18
Tera Contributor

I'm trying to add members from flow designer using Update record action. I have used "Data pills" and "Inline script" to add members from flow designer. But the system is not adding members to watchlist of RITM.

19 REPLIES 19

Peter Bodelier
Giga Sage

Only thing I can think of, is there is some timing issue.

Try putting a wait of 2 seconds in front of this action.
If it still doesn't work, do you see any errors in the system log?


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

Rohit01998
Tera Guru

Hello @Abhishek18 

try with this flow designer...

 

1.Trigger

Screenshot 2023-09-01 at 1.11.03 PM.png

2.Action

Screenshot 2023-09-01 at 1.11.27 PM.png

 Script for watch list field

var gr = new GlideRecord('sc_req_item');
gr.addQuery('request',fd_data.trigger.current.sys_id);
gr.query();
if(gr.next()){
 return gr.getDisplayValue('requested_for.manager');
}

 

Mark my answer correct and give 👍if this helps you...

Thanks,

It is working as expected in OOB instance, but its not working in our instance. I will raise a HI Case for this. 

 

Thank you all for your assistance.

Abhishek18
Tera Contributor

Hi @Rohit01998 @Ankur Bawiskar 

I found the root cause of the issue. There was a business rule written on sc_task table that whenever a record is inserted on sc_task table, the watchlist members od sc_task should be copied to ritm. 

By this, the watchlist members are initially adding to RITM watchlist, because of the business rule on sc_task, the watchlist members are getting removed on ritm table.

ChitranshSYadav
Tera Contributor
I suppose - requested manager variable is reference field then you may try below code.
 
var user = fd_data._1__get_catalog_variables.requested_for.manager;
return user;