Flow designer script for approvals
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
9 REPLIES 9
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Why don't you just set the group?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @Alon Grod ,
Please review the screenshot for approval script-
and here is the code-
if(fd_data.trigger.request_item.cat_item.u_require_manager_approval){
var requestedfor=fd_data._1__get_catalog_variables.requested_for;
if(requestedfor){
if(fd_data._1__get_catalog_variables.requested_for.manager.active){
return "ApprovesRejectsAnyU["+fd_data._1__get_catalog_variables.requested_for.manager.sys_id+"]";
}
}else if(fd_data.trigger.request_item.requested_for.manager.active){
return "ApprovesRejectsAnyU["+fd_data.trigger.request_item.requested_for.manager.sys_id+"]";
}
if your group is fixed or static you can directly select using the group picker
If you found my response helpful, please mark it as helpful and accept it as the solution.
Thank you
Nawal Singh
Thank you
Nawal Singh
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @Alon Grod
Declare the Variable before the if statement block.
var gpz= '';
if(gr.next())
{
gpz= gr.sys_id;
}
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
55m ago
@Voona Rohila Still
not working