Button visibility for Incident states

NishaB
Tera Expert

Hi,

For the incident form, I want the buttons like 'Save' or 'Update' visible for states like New, In Progress, On Hold. And I want these buttons to be hidden on Closed state. How to do this?

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@NishaB 

Don't update the OOB UI Actions.

Basically you are allowing user to Update in those states.

Then why not ensure table.None WRITE ACL is allowing update only for those states?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

7 REPLIES 7

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @NishaB 

 

So you want the states as UI action, what value it will bring and increase the technical debt. So, it's not recommended.  If you still want, create UI action and then add logic.

*************************************************************************************************************
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
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

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

No. For example, when the incident record is in New state, I want Save button in the incident record to be visible. When the incident record is in Closed state, I want the Save button to be hidden. Like that

Najmuddin Mohd
Mega Sage

Hi @NishaB ,
Navigate to the UI Actions and open the 'Save' button.

In the conditions, add current.state is not closed.

 

If the above information helps you, Kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin.

Mahathi
Mega Sage
Mega Sage

Hi @NishaB,

It is good to go with OOB as already suggested.

You can update the UI Actions of the buttons to make it visible in states except closed.

Mention in the Condition field of UI Action the states - Sample: current.incident_state != IncidentState.NEW   or use gs.hasRole to hide for certain roles based on your requirement.

If my answer helped in any way, please mark it as Correct & 👍Helpful.

Regards,
Mahathi