How to Show/hide HR service on Case creation page for an Assignment group

Mrman
Tera Guru

Hi,

We have a HR Service 'ABC' created which should only be only visible to as assignment group 'XYZ '

Please let me know how to Show the HR service only to this group on the Case creation page and other agents should not see this.

 

find_real_file.png

5 REPLIES 5

Marty Bright
Giga Expert

Mrman,

On the HR Service configuration form, use a HR Criteria to restrict the service per assignment group. 

Configure an HR service | ServiceNow Docs

Marty

Christian Prob2
Tera Guru

Hi @Mrman 

I believe that can be achieved via the "CoE security configuration" module - create read and write records for the CoE and add the HR service as a condition (deactivate "Applies to all services"), then add the groups below that should have access.

I am not 100% sure that also prevents the Service to not show in the screen you presented above, but it should certainly prevent other users to create, change and read such cases.

Christian

Please mark helpful or correct, if deemed so. Thank you.

Narasimha10
Tera Contributor

Do we have any update on this? i need the same info as i have same requirement to implement

David Aldridge
Giga Guru

Hi @Mrman , I think what you will need to do is edit the reference qualifier script on the HR Service field of the HR Case table. You can include the rules you want in the advanced JavaScript.

HR Criteria won't give you the result you want as these will be based on the "Subject Person" not the HR Agent.

I don't think COE security will work as these rules can't come into effect until AFTER the service is selected, unless they are referenced by the OOTB reference qualifier functions (getQueryToLimitServices).

Doesn't look like it from the code...

    getQueryToLimitServices: function(record) {
        var hrServiceIds = [];
        var grHrServices = new GlideRecord('sn_hr_core_service');
        grHrServices.addActiveQuery();
        grHrServices.addQuery("value", "!=", hr.BULK_PARENT_CASE_SERVICE);
        grHrServices.addQuery('topic_detail.topic_category.coe', record.getRecordClassName());
        if (record.topic_detail)
            grHrServices.addQuery("topic_detail", record.topic_detail.toString());
        if (record.topic_category)
            grHrServices.addQuery("topic_detail.topic_category", record.topic_category.toString());
        if (gs.nil(record.subject_person)) // Cannot evaluate HR Criteria without a user
            grHrServices.addNullQuery("hr_criteria");