How to set UI Action Grayed out
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2024 06:28 AM
Hi Team,
How to set "Update" UI action to grayed out in Incident, when state is 'Closed' and Priority is '1-High'
Thanks
Anil!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2024 06:45 AM
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