Contains information about the execution of an actionable notification.
Namespace
Usage
This ActionResult instance represents the successful execution of an actionable notification.
Messaging.ActionResult result =
new Messaging.ActionResult.Builder()
.withSuccess(true)
.withMessage('Action is executed successfully')
.build();
This ActionResult instance represents the unsuccessful
execution of an actionable
notification.
Messaging.ActionResult result = new Messaging.ActionResult.Builder() .withSuccess(false) .withMessage('Error updating case') .withErrorCode(Messaging.ActionError.INTERNAL_ERROR) .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