How to set UI Action Grayed out

Ranjani4
Tera Contributor

Hi Team,

How to set "Update" UI action to grayed out in Incident, when state is 'Closed' and Priority is '1-High'

 

Thanks 

Anil!

1 REPLY 1

Shaqeel
Mega Sage

Hi @Ranjani4 

 

Follow these steps:

1. Navigate to System UI > UI Actions in ServiceNow.
2. Search for the "Update" UI Action in the Incident table.
3. Open the "Update" UI Action.
4. In the "Condition" field, you can add a script to check the state and priority of the incident. The script could look something like this:

javascript
current.state == '7' && current.priority == '1'

Here, '7' is the value for 'Closed' state and '1' is the value for '1-High' priority.

5. In the "Script" field, you can add a script to disable the UI Action. The script could look something like this:

javascript
this.setDisabled(true);


6. Save the changes.

 

Regards

Shaqeel


***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.

***********************************************************************************************************************





Regards

Shaqeel