How to send approvals from business rule for catalog form ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 08:32 AM - edited 02-26-2024 08:33 AM
Hi,
I have requirement like from catalog form its triggering apporval to requested for manager but needs to exclude few users like abc@gmail.com, pqr@gmail.com and xyz@gmail.com
How can I achieve this from business rule ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 08:45 AM
Hi @raj99918 ,
The best way to do this is, in workflow add run script activity.If your script is the best way to get to the group in question, that's fine for starters, then you would run this script inside the if block instead of your answer line. Otherwise, just use this script with a hard-coded group sys_id if it will always be the same
answer = [];
var mbr= new GlideRecord('sys_user_grmember');
mbr.addQuery('group', gr.sys_id.toString()); //or use following line instead
//mbr.addQuery('group', '1'); //replace 1 with sys_id of group
mbr.addQuery('user','NOT IN','1, 2, 3'); //replace 1, 2, 3 with sys_ids of users to exclude
mbr.query();
while(mbr.next()){
answer.push(mbr.user.toString());
}
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 09:01 AM
HI @Sumanth16 Thanks for the reply. Already I achieved this requirement from workflow with the help of Run script activity but is there any alternative way to achieve it from business rule. My requirement is it needs to skip the mangers approval if the mangers names are those 3 if it’s one of these 3 it will trigger different group approval otherwise normal requested for manager approval