- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2024 09:48 AM
Hello all,
I am working to create a task in our separation\termination workflow. I need to have a task created for manual review when a user is in a group or has roles assigned. I found away to create a rule if the user has a specific role but not away for if the person has a group assigned to the profile. How has someone done this in the past?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2024 10:46 AM
Hi If user has having any group in his profile you can try the following code
var assignedtouser = current.assigned_to;
if (assignedtouser) {
var userGr = new GlideRecord('sys_user_grmember');
userGr.addQuery('user', assignedtouser); // Correct variable name
userGr.query();
if (userGr.next()) {
return true;
}
}
return false;
Thanks and Regards
Sai Venkatesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2024 10:11 AM
Hi @EcFuhrmann ,
Do you need to find whether user has any particular group assigned to his profile or any group
Thanks and Regards
Sai Venkatesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2024 10:34 AM
Any group in the profile of the user. They maybe in a group for approval but not using an ITIL licenses as an example. In the past people leave the organization and would be the only approver which cause delays in processing requests.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2024 10:46 AM
Hi If user has having any group in his profile you can try the following code
var assignedtouser = current.assigned_to;
if (assignedtouser) {
var userGr = new GlideRecord('sys_user_grmember');
userGr.addQuery('user', assignedtouser); // Correct variable name
userGr.query();
if (userGr.next()) {
return true;
}
}
return false;
Thanks and Regards
Sai Venkatesh