Can the visibility of the catalog item (service catalog) can be restricted by employee type? I want to restrict a catalog item for employee type contractors. What is the best can be be done for this, so that no contractors can see the catalog item?

Eva2
Kilo Contributor

Can the visibility of the catalog item (service catalog) can be restricted by employee type?

I want to restrict access for a catalog item of employee type contractors.

What is the best can be be done for this, so that no contractors can see the catalog item?

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Namita,

 

You should be able to restrict the visibility of the catalog items via User criteria (Advanced Script).

Script below:

checkEmployeeType();

function checkEmployeeType() {

    var user = new GlideRecord('sys_user');
    user.get(gs.getUserID());
    user.query();
    if (user.u_employee_type == 'contractor') //assuming u_employee_type is the column name
    {
        return false;
    }
    return true;
}

Details here https://docs.servicenow.com/bundle/orlando-it-service-management/page/product/service-catalog-manage...

 

- Pradeep Sharma

View solution in original post

5 REPLIES 5

Ishita Shrivast
Kilo Guru

Hi Namita,

Try this

  • Give the role of contractor to the employees or group them accordingly.
  • Go to Maintain Items>Your Catalog Item
  • Under Not Available For Related List, select the group or role of the employee as "contractor" .

Hope this helps. Please mark it as helpful and correct , if applicable.

Thanks and Regards,

Ishita Shrivastava.