Anywhere Mobility Studio Documentation
Button properties
| Property | Description |
|---|---|
| Process Code | Identifier of the process |
| Activity Code | Identifier of the activity |
| Code | Identifier for the button |
| Type | <none>, Back, Cancel, Lookup, LookupOK, Repeat. The type determines which action performs. |
| Description | Caption of the button on the mobile client |
| Hotkey | Function button that activates the button as an alternative to selecting or touching |
| Default | Indicates the button that activates when a user presses Enter |
| Connection No. | When the button is selected, triggers a connection that writes data to the database |
| Codeunit No. | Determines that a codeunit executes. This runs after the connection processes. |
| Skip Validation | In combination with the control's mandatory property, lets the user skip mandatory fields to access a different part of the flow |
Type
The type of a button determines which activity activates in the flow:
- <none>: The default type. A button with this type executes the next activity in the flow.
- Back: Takes the process back one or more activities in the activity stack. Also deletes the activity and stack parameters associated with these activities. Connection and codeunit do not execute.
- Cancel: Takes the process back to the beginning of the current activity. Deletes the activity parameters. Connection and codeunit do not execute.
- Lookup: Starts a lookup for the parameter linked to an active editable textbox. A lookup is a data grid activity with records from the same table as the table of the parameter. After the lookup, the parameter contains the selected value.
- LookupOK: The same as a Lookup, with the added functionality that it executes the default action on the activity where the LookupOK button is defined, including the connection and codeunit defined on the default button.
- Repeat: Requires a connection. When no valid process flow exists, returns to the same activity and clears all related stack parameters. Use this to configure a recurring activity.
Codeunit No.
Executing a codeunit lets you perform more complex tasks than modifying records in the database, such as releasing an order or printing a document. The codeunit number refers to a codeunit that a button in the mobile client calls. The codeunit executes after input validates and the connection triggers, but before the next activity in the process determines. The codeunit always runs synchronously, while post-processing in the connection always runs through the Job Queue.
The codeunit's OnRun trigger is called. The OnRun trigger must take the NDAW Queue record as a parameter. This queue record contains key information about the current state of the process. From the codeunit, triggers in standard Dynamics NAV codeunits can be called.
Most pre-configured processes use post-processing via the connection, which executes the codeunit from the Job Queue.
Use this functionality only when post-processing with the Job Queue in the connection is not possible or desired.