Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to restrict HR agents from reopening closed HR cases?

Vasu ch
Kilo Sage

Hi,

I have a requirement that if a HR case is closed complete then HR agents should not reopen it. Only HR Admins should be able to reopen them. This is a common requirement. Do we have any OOB setup for this or do I need to create ACL?

 
4 REPLIES 4

palanikumar
Giga Sage
Giga Sage

You can set the Re Open button visible only for Admins

Thank you,
Palani

But agents can still able to edit the state field. I believe we can do this using an ACL but I want to understand is there any OOB setup for this requirement as its very common case.

Marcel Hopp
Tera Contributor

@Vasu ch you need to configure it by your own as there is no OOTB setup for this.

 

Marcel

aryanjain25
Giga Guru

Hi @Vasu ch , 

 

To restrict the reopening of HR cases to only HR Admins when they are marked as “Closed Complete,” you can implement a Business Rule.

 

Here is a sample script:

 

if (current.state.changes() && current.state == 'Closed Complete' && !gs.hasRole('sn_hr_core.hr_admin')) {
    gs.addErrorMessage("You are not authorized to reopen this case.");
    current.setAbortAction(true);
}

 

I would appreciate if you can mark this response as correct or helpful if it assisted you with your question.

 

Thanks,

Aryan Jain