Hide 'Resolve' button and 'Resolved' state when there are an active Incident Tasks

Basim Zaidi
Mega Expert

Hi community,

Any help would be appreciated here!

I require to hide the 'Resolve' button and 'Resolved' state of an Incident if there are active Incident Tasks associated to a parent Incident record (if the logged on user is not admin).  I have come across a few posts in the community (e.g. the following link) but none of these seem to be working for me.

https://community.servicenow.com/community?id=community_question&sys_id=82ef87a5dbdcdbc01dcaf3231f96...

 

(I thought this may provide some guidance too --> https://community.servicenow.com/community?id=community_question&sys_id=7bc00f65db98dbc01dcaf3231f96...)

If anyone can post  step by step guide in what needs to be done to achieve this/any help would be greatly appreciated!

Thanks,

Bas

5 REPLIES 5

For anyone wanting to use this.

gr.addQuery("parent", current.sys_id);

should be 

gr.addQuery("incident", current.sys_id);