State is showing incorrect value when onSubmit validation fails.

sundeep pottepa
Tera Contributor

Hi Community,

 

when I click on resolve button on incident form it is changing the state to resolved and throwing an error to fill all the mandatory details to resolve. which is an expected behaviour. but I don't want to show the state as resolved i just want it to thrown an error to fill mandatory fields and stay in the original state value.

 

 

Thanks & Regards,

sundeep

2 REPLIES 2

Jordan Vignoni
Tera Guru

I believe the UI Action changes the State to "Resolved", and then a UI Policy makes the fields mandatory. You would have to update the UI Action to check the mandatory fields first and, if they are populated, then the State can change to "Resolved".

Community Alums
Not applicable

I'm sure out of box the ui action sets it to resolved but doesn't commit the save because of the mandatory fields. If you refresh the record it will still be in the current state