Mobile Development: Dialog Result for the Close Button

In MYOB Acumatica 2025.1, a developer can specify a dialog result for the Close action (which corresponds to the X button on a screen toolbar) of a dialog box mapped to the mobile app in one of the following ways:

  • Specify the dialog result in the CloseButtonDialogResult property of the dialog object
  • Define the Close action in detail by using the CloseButtonDialogAction property of the dialog object
Tip: A developer can use only one of the approaches for each action.

Specifying the Dialog Result for the Close Action

To specify the dialog result for the Close action, a developer needs to specify it in the CloseButtonDialogResult property of the dialog object. The possible values of the property correspond to the elements of the WebDialogResult enumeration. The following code shows an example of the dialog result value being specified for the Close action.

update screen SO301000 {
  add dialog "AddLine" {
    CloseButtonDialogResult = "No"
    ...
  }
}

Defining the Close Action

A developer can define the Close action by doing the following:

  1. In the dialog object, define an action by adding the dialogAction object.
  2. In the dialogAction object, specify the dialog result in the dialogResult property. For more details, see dialogAction.
    Tip: In the dialogAction object, there is no need to specify the CloseDialog property because the button closes the screen by default.
  3. In the dialog object, specify the name of the action in the CloseButtonDialogAction property.

The following code shows an example of the Close action being defined in a dialog box.

update screen SO301000 {
  ...
  update dialog "AddLine" {
    CloseButtonDialogAction = "NoAction"
    update dialogAction "NoAction" {
      dialogResult = "No"
    }
  }
}