addAction


Purpose

Adds an action to the action queue.

Signature

addAction( type, handle, metadata, data, onSuccess, onFailure )

Returns

This method does not return anything.

Parameters

Name Description Type Use
type This parameter is ignored. string required
handle This parameter is ignored. string required
metadata Action's meta data. string required
data The action's data string. string required
onSuccess A callback function, informs that the operation completed successfully. The onSuccess function takes an id parameter that is used to identify the action that was just added. function required
onFailure A callback function, called when the operation fails. Returns an error code, as defined in the Constants table in the Client Store article, and an error message. function required

Caution

For the synchronization process to execute as designed, both metadata and data strings must contain a proper JSON object.

Related topics

Client Store
Legal notice | Copyright © 2017 and Confidential to Pegasystems Inc. All rights reserved
PDN | Pega Mobile Client | Feedback
Advanced...