Client side changes to Server Side UI Action.

Abhijit Das7
Tera Expert

Hi Everyone,

 

I'm facing an issue with the Signatory field on the Work Order.

The Signatory field can be either mandatory or optional based on the Entitlement/Contract, and this is controlled through a UI Policy. When the field is mandatory, users must enter the caller's name. Values such as "No Bill" or a blank value are not allowed.

To enforce this, we have a Business Rule that aborts the transaction when a user saves the Work Order with an invalid Signatory value.

The problem occurs when the user does not save the form:

  1. User enters "No Bill" in the Signatory field.
  2. User does not click Save.
  3. User clicks Ready for Dispatch.

The Ready for Dispatch UI Action is a server-side button that creates a Work Order Task. In this scenario, the unsaved Signatory value is submitted to the server as part of the UI Action request. As a result, the Work Order Task is created even though the Signatory value is invalid. After the action completes, the Signatory field appears blank on the Work Order, but the Work Order Task has already been created.

My question is:

How can I validate the unsaved client-side value of the Signatory field within the server-side Ready for Dispatch UI Action and prevent Work Order Task creation when the value is "No Bill" or blank?

Also, the Ready for Dispatch UI Action is using:

current.setWorkflow(false);


I am not even sure wether I can remove this setWorkflow as false, as it could affect other process.

Thanks in advance

0 REPLIES 0