Unable to add members to watchlist of RITM from flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2023 05:00 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2023 06:14 AM
I'm trying to add Requested for manager to the watchlist from flow designer.
I'm able to do it through business rule but I'm unable to add members to watchlist of RITM from flow designer using "Update Record" Action.
I have also written an action and called the action through flow, but it didn't work as well. Please see the below code that I have wirtten in action.
When I manually run the action by using Run Test option, it is adding members (Requested for) manager to the watchlist. But when the flow is triggered by system when RITM is created, then it is not adding members to watchlist.
var manager = inputs.Managersysid.toString(); //manager sys id
var glideRequest = new GlideRecord("sc_req_item");
if(glideRequest.get(reqid)){
glideRequest.watch_list=manager;
glideRequest.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2023 06:20 AM
using inline script it should work
you are just returning the single user here
var user = fd_data._1__get_catalog_variables.requested_for.manager.sys_id;
return user.toString();
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2023 06:33 AM
Even with the inline script, the system is not adding.
Please see the attached screenshot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2023 06:56 AM
are you sure variable name is correct and that user has manager?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2023 07:03 AM
Yes, I'm sure on the variable name, I have tried returning just the sys id of the user but it didn't work as well.