openLocalAction(actionID, options)
Opens the configured local action.
Returns
A Promise associated with the action.
Parameters
Name | Type | Description | Required |
actionID | object | The ID of the local action. | ✅ |
options | object | The JavaScript object containing the properties for opening the local action. | ✅ |
The following table contains the properties of the options object:
Name | Type | Description | Required |
caseID | string | The unique ID of the case. If this ID is not provided, it will be obtained using the current context. | ❌ |
assignmentID | string | The unique ID of the assignment. If this ID is not provided, it will be obtained using the current context. | ❌ |
actionTitle | string | The title of the local action. This is used as the modal header title when the local action is displayed in the modal dialog. | ❌ |
type | string | The type of the local action. The values are
Assignment , Case ,
Stage , and
Express .Example:
| ✅ |
Usage example
In this example, the success callback is called if the local action is launched successfully.
const localActionPromise = getPConnect().getActionsApi().openLocalAction("EditDetails", { type : "Case" });
localActionPromise.then(() => {
// local action success handling
}).catch(() => {
// local action failure handling
});
Previous topic openAssignment(assignmentID, className, options) Next topic openProcessAction(actionID, options)