Catalog task in workflow for Termination

EcFuhrmann
Tera Contributor

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?

1 ACCEPTED SOLUTION

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

View solution in original post

3 REPLIES 3

SAI VENKATESH
Tera Sage
Tera Sage

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

 

 

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. 

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