Skip to content

Actions

Actions are configurable event handlers that can perform tasks in your application. You can choose from predefined action types to quickly and easily create actions that would otherwise need to be defined manually using JavaScript.

An example of action type is Navigation action that when executed allow you to navigate to a target page, you can also specify whether it is a modal page.

All actions comes with an OnSuccess and OnFailure properties that allow you to 'chain' them with other actions or rules.

The action binding and the action result are shared along the 'chain' and the 'chain' is considered complete when the last action or rule in the chain has completed (failure or success).

Creating Actions

Prerequisites

You must have a valid Mobile Development Kit project. A ClosePage.action file is automatically created under the Actions folder.

Context

The following steps describe how to create a new action:

Procedure

  1. Right-click on the Actions folder and select MDK: New Action.
  2. On the Template Selection page, choose the type of action you want to create and select Next.
  3. On the new page, provide a name for the action. Depending on the action type, you can optionally add existing services to bind with the action. Select Next to proceed or select Finish to complete.

A new .action file is created in the Actions folder. Right-click on the .action file and choose Open With and then select Text Editor or Action Editor to view or edit the code.

Note

Changes made in the action editor simultaneously appear in the code editor.

MDK Editor is the default editor. You can change the default editor in the status bar.

Action Categories

Base Action Properties

Every action has metadata properties that are common to all action types. For each action, there is a .action file that contains its metadata.

You can find the API reference for all of the action types here

Bar Code Scanner Actions

Create actions that enable users to scan bar codes.

Data Actions

OData Actions

Create actions for executing OData operations. Read, create, update, and delete OData entities, and more. You can retrieve and modify data from OData services or offline OData service and associated entities in your application.

Offline OData Actions

Create actions for managing offline data. Initializing the offline database, upload or download data to the offline databases With these actions, you can transfer back-end data between your mobile device and the offline OData provider. You can also modify the back-end data through your application.

Media OData Actions

Create actions for creating, downloading or deleting media streams in your application.

Log Actions

Create actions that allow app to manage logging, trigger logging and upload client log to the mobile services.

Message Actions

Create actions that allow app to display message such as toast, banner, pop up message, confirmation dialog, and more.

UI Actions

Create actions that enable users to interact with your application UI, such as navigating through pages, opening documents, or set languages.

Other Actions

Create actions such as triggering application updates, change user passcode, logging out, registering push notification.


Last update: January 17, 2023