Remove "Delete" option from a Demand Not in DRAFT state

r2024
Tera Contributor

I need the Delete option to be disabled on all Demands once the Demand has left the DRAFT state so that a Demand does not get deleted accidently. I need to do this in the condition field, but it disable the delete option on all stages. I need the delete option to show only in the DRAFT state.

2 REPLIES 2

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @r2024 

 

You need to add condition on Delete UI action , to hide the button or best is use ACL to restrict as per role. bcz some time we need to delete demand even though in draft state. 

*************************************************************************************************************
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]

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

Hello AG,

"You need to add condition on Delete UI action"

I put in the condition field && current.state == 'Delete'.

The result was that the Delete link was taking off on all stages, but I want it in only on Draft stage. How do correctly write it in the condition field?