How to enable . configure Cancel button in new problem form

Research
Tera Guru

Hi
I want to enable the Cancel button in problem form when state is "new"

Cancel button is visible when state is Access and RCA, Resolved 

Research_0-1744149428656.png


Similar I want the button in new state

Research_1-1744149502209.png

any suggestion help me

Thanks

 

2 ACCEPTED SOLUTIONS

Hello @Research 

 

Just append this in the beginning - 

 

current.state == '101' || (.......your existing conditions....) 

 

This will.make it shownup in new state as well. 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

View solution in original post

@Research 

ensure you update the existing condition and add yours with OR condition

Also ensure you allow the state transition for this as mentioned by @Shivalika 

Remember you might have to update the Form action for workspace

 

AnkurBawiskar_0-1744175561262.png

 

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

13 REPLIES 13

I am not sure @Research 

 

Why are even trying to update from new to closed ? This is not a state transition defined in OOB. 

 

For State transitions to happen - they need to be allowed in State transitions and state transition conditions. 

 

Additionally your requirement was just to make cancel button visible in new state - which we already shared and discussed. Now this state transition is different.

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

@Researchjust check in new state if "cancel" button is visible or not. 

 

Ok so your requirement is apart from cancel button visible - you also want to allow - state jump from new to cancel - that's a different ask - cancel button is visible right ? 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

 

@Research 

 

If cancel button is visible in new state - kindly accept solution and mark helpful and we can discuss over your next requirement as well. Because of two different things this confusion happened here. 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

Sara Saravanan
Tera Contributor

1) Open Cancel UI action (Table : Problem ) and modify the condition as below:

current.canWrite() && (new ProblemStateUtils().canMarkDuplicateOrCancel(current) || current.state=='101'

2) Open State model from navigator > Click on Problem Management: Default Flow > Click on "Closed" State transition at the bottom of the screen > Next page appears , please add "New" state in   Enter condition filter 

3) Click on Problem Model > General > Bottom of the screen , click on New in the Model states and add New to Closed state transition