Mandatory Fields: UI Policy vs UI Action

brian-rowland
Mega Contributor

I've run into a weird issue with setting fields mandatory with UI Policies and UI Actions. We have 2 UI policies that set several fields mandatory if the incident.state is "resolved." One is the OOB policy that makes the close notes and close code fields visible and mandatory, and the other sets a custom field mandatory. We also have a UI Action, "Resolve Incident" that changes the state of the incident. The issue I'm having is that the custom fields are not set mandatory when using the UI Action. From what I've deduced so far, UI Policies are not evaluated when a UI Action is activated since the actions run on the server, and something else is setting the fields mandatory. From what I can tell it's not a client script or script action, and the UI Action only modifies the incident.state value. Any ideas?

Thanks

Brian Rowland

1 REPLY 1

brian-rowland
Mega Contributor

Solved:
In addition to the "(BP) Hide Close Notes and Code" client script which fires onLoad, there is a second client script "(BP) Close Mandatory on Close or Resolve" that runs onSubmit. Both scripts do essentially the same thing, and one was disabled while the other was still active.

Now to duplicate my UI Policy logic in the client scripts...