Validate Action

The <action-validate> is used to validate a record.

<action-validate name="action-sale-order-validate">
  <error message="Create Date is in future." if="confirmed &amp;&amp; createDate &gt; __date__"/>
  <error message="Order Date is in future." if="confirmed &amp;&amp; orderDate &gt; __date__"/>
  <alert message="No Sale Order Items. Would you like to continue?" if="confirmed &amp;&amp; !items"/>
</action-validate>
Table 1. Attributes
Name Description

name

name of the action

The validate action requires following items:

  • <error> - define an error condition

    • if - a boolean expression against the current context

    • message - the message to show if condition failed

    • action - an action-record to be executed on confirmation

  • <alert> - define an alert condition

    • if - a boolean expression against the current context

    • message - the message to show if condition failed

    • action - an action-record to be executed on confirmation

  • <info> - define an information condition

    • if - a boolean expression against the current context

    • message - the message to show if condition failed

  • <notify> - define an notification condition

    • if - a boolean expression against the current context

    • message - the message to show if condition failed

If the action results in an error then further action processing is terminated and an error message will be shown to the user. If provided, confirmation actions will be executed when the user confirms the error confirmation dialog.

If the action results in an alert then further action processing is halted and a confirmation message will be shown to the user, if confirmed, the pending actions will be executed. If provided, confirmation actions will be executed when the user confirms the alert confirmation dialog.

If the action results in an info pending actions will be executed and a message will be shown to the user.

If the action results in an notify pending actions will be executed and a notification popup is shown at the bottom right. The notification is disappeared automatically after 5 seconds if not closed