Newer Version Available

This content describes an older version of this product. View Latest

ActionResult Class

Contains information about the execution of an actionable notification.

Namespace

Messaging

Usage

This ActionResult instance represents the successful execution of an actionable notification.

1Messaging.ActionResult result = 
2new Messaging.ActionResult.Builder()
3.withSuccess(true)
4.withMessage('Action is executed successfully')
5.build();
This ActionResult instance represents the unsuccessful execution of an actionable notification.
1Messaging.ActionResult result = 
2new Messaging.ActionResult.Builder()
3.withSuccess(false) 
4.withMessage('Error updating case')
5.withErrorCode(Messaging.ActionError.INTERNAL_ERROR)
6.build();

ActionResult Methods

The following are methods for ActionResult.

getErrorCode()

If an error occurred, returns an object that provides the error code and a description.

Signature

public Messaging.ActionError getErrorCode()

Return Value

Type: Messaging.ActionError

getMessage()

Returns the success or error message that displays for the user.

Signature

public String getMessage()

Return Value

Type: String

isSuccess()

Returns true if the action executed successfully; otherwise returns false.

Signature

public Boolean isSuccess()

Return Value

Type: Boolean