How to run UI Policy validation from UI Action? (UI Policy vs UI Action runtime order)

jamesmcwhinney
Giga Guru

From what I can tell, the UI Action runs before the UI policies.

For example, if I click a UI action "Resolve Incident", it sets the state to "Resolved" and then submits the form.

The UI policies then run afterwards and tell the user that they have forgotten a number of fields.

I have been asked to not set the state to "Resolved" until after the form is submitted (After the validation is successful).

I realize I could duplicate the mandatory field logic within the UI action, but I feel this will be redundant and an annoying practice to adopt.

Is there any way to call the UI policies from within the UI Action? (Ensure the UI policy mandatory fields are filled in before setting the state to "resolved"?)

Thanks,

- James

1 ACCEPTED SOLUTION

Abdul Khan4
Kilo Guru

Hi James,



I suggest to make a generic functions in UI Script. Call this generic script from UI action and UI Policy or Client Script.



Regards


Abdul Khan


View solution in original post

7 REPLIES 7

Abdul Khan4
Kilo Guru

Hi James,



I suggest to make a generic functions in UI Script. Call this generic script from UI action and UI Policy or Client Script.



Regards


Abdul Khan


Hi James,



If your problem gets resolved, can you please accept the solution.


Your feedback is appreciated.



Regards


Abdul Khan


sathish639
Tera Contributor

I know this post is pretty old, but if it helps anyone at all, then converting the UI Policy to Data Policy does resolve this issue.