- 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 06:18 PM
You must be in Fuji, business rule scripts have changed with each release a little. Follow Pradeeps instructions but only copy lines 4-11 above and paste that into the function in your business rule in the advanced tab. This code should go between the curly {} brackets.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2016 02:10 PM
Thanks, the code got saved, i added the user to the group for the condition to apply but VIP still didnt get checked, how does it look so far?
The user i tested on is part of the group Authorized_to_skip_approval
function onAfter(current, previous) {
//This function will be automatically called when this rule is processed.
var usergr = new GlideRecord('sys_user');
usergr.addQuery('sys_id', current.user);
usergr.query();
while(usergr.next())
{
usergr.vip = 'true';
usergr.update();
} }

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2016 02:57 PM
Please select insert and update checkbox to true.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2016 03:15 PM
Just a reminder that you may want to setup the opposite as well.
Removed from group, set VIP to false, just to keep your data clean.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2016 03:23 PM
I checked the INSERT and UPDATE but still no luck, the dictionary for VIP is called sys_user.vip
This is what it is targetting right? how would i add this to the code? to clean up after itself