- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 09:36 PM
Hi Everyone,
We have a catalog item that requires 3 approvals.
The 1st (user manager) and 2nd (AOA POC) approvals are working, but the 3rd one (AOA Head) is being skipped.
Skipped error
Group approval setting
// Set the variable 'answer' to a comma-separated list of group ids or an array of group ids to add as approvers.
answer = [];
var country = current.location.country.toString();
var groupName;
if (country == 'Singapore') {
groupName = gs.getProperty('glide.aoa.atsh_techmgr');
}
else if (country == 'China') {
groupName = gs.getProperty('glide.aoa.atc_techmgr');
}
else if (country == 'Korea, Republic of') {
groupName = gs.getProperty('glide.aoa.atk_techmgr');
}
else if (country == 'Malaysia') {
groupName = gs.getProperty('glide.aoa.atm_techmgr');
}
else if (country == 'Taiwan') {
groupName = gs.getProperty('glide.aoa.att_techmgr');
}
else if (country == 'United States') {
groupName = gs.getProperty('glide.aoa.ati_techmgr');
}
else if (country == 'Japan') {
groupName = gs.getProperty('glide.aoa.atj_techmgr');
}
else if (country == 'Portugal') {
groupName = gs.getProperty('glide.aoa.atep_techmgr');
}
else if (country == 'Vietnam') {
groupName = gs.getProperty('glide.aoa.atv_techmgr');
}
else {
groupName = gs.getProperty('glide.aoa.amk_techmgr');
}
if (groupName != '') {
var gr = new GlideRecord('sys_user_group');
if (gr.get('name', groupName)) {
answer.push(gr.sys_id);
}
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2024 07:39 PM
I have my solution here.
The sys property of the groups I made are not working.
So I used the 'If' condition core instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 09:39 PM
Hello,
Group Approvals generally get skipped because there are no active members in the group.
Please check if that is the case.
If my answer helped you in any way please mark it as correct or helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 10:40 PM
All groups have active members.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 10:57 PM
Hello,
Try adding below logs.
1. Log to check if country is being fetched correctly in the variable.
2. Log to check if group name is being populated correctly in group name variable
3. Log to check in answer variable groupname value is being pushed or not
If my answer helps you in any way please mark it as correct or helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 11:14 PM
Hi @Vishwa Pandya19 ,
I've been using that script to other catalog items. Only the difference is the sys property of the group.