Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Resolve UI Action to hide for a custom field value on Incident form

Shree Nag
Tera Expert

Hello,

I have been tasked to have a custom field called Security approval on incident form.

When the Security approval is selected as "Rejected",  the user cannot close the incident. The RESOLVE  button on top of the form should hide.

I have UI policies for Close notes, Closed by, Resolved by, Resolution notes, which works as expected.

But to hide the Resolve button form on the top of the incident form, I made changes on Resolve Incident UI action. condition.

(current.incident_state != 7 && current.incident_state != 6) && (gs.hasRole("itil") || gs.hasRole("itil_admin") || current.caller_id == gs.getUserID())  && current.u_it_security_approval == 'rejected'.

 

when Security filed is chosen Rejected, The resolve button on top should hide.

But when chosen approved back again, It does not show up again.

How do I approach the UI action on resolve button to show up for when Security is approved, and hide when security is rejected.

Attached dis the pic to show the resolve button on an incident form

 

-Thanks. Pelase help.

1 REPLY 1

Tanushree Maiti
Kilo Patron

Hi @Shree Nag 

 

Typically, selecting “Reject” means the process should end.
However, in your case, "But when chosen approved back again,

you’ll need to set u_it_security_approval to Requested (or a similar value based on your requirement).

 

Only then will the UI Action become visible.

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: