- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2016 03:05 PM
We want to manage VIP user using groups, how can i enable the VIP checkbox auto when the user is part of a group ?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2016 03:21 PM
The problem with that is you are needing the business rule to run off the sys_user_grmember table and setting a value in the sys_user table.
Plus, we've determined that it runs when you manually add/remove someone from the group, so the business rule seems to work.
Here is what i would do.
Create a new community post with the question of why is my business rule not running on the LDAP import explaining that it works when you manually add someone to the group, but when the transform map does it, the business rule does not run even when 'run business rules' is checked.
This might find someone who has an answer to respond since this issue is not obvious from the current post question...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2016 03:08 PM
Hi Mathieu,
You can create a BR on table "sys_user_grmember" and then as per your logic GlideRecord the target table i.e "sys_user" and set the VIP field for specific user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2016 03:43 PM
Ah gotcha ! can you help me write the script for the advanced tab? not sure what it should look like, i'm very novice in scripting
The group i will use to set VIP will be called Authorized_to_skip_approval

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2016 03:54 PM
Hi Mathieu,
Sure. You have to create after BR(select insert or update checkbox to true as per your req) and have filter condition i.e group is XYZ(filter condition so that the BR will be trigger only in this scenario) with the script
Script :
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var usergr = new GlideRecord('sys_user');
usergr.addQuery('sys_id', current.user);
usergr.query();
while(usergr.next())
{
usergr.vip = 'true';
usergr.update();
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2016 04:14 PM
Thanks ! i get this error when adding that script hough
Missing function declaration for onAfter