ActionableNotification Class

Contains information about an actionable custom notification.

Namespace

Messaging

Example

This example shows how to create an ActionableNotification object by using the ActionableNotification.Builder class.
1Messaging.ActionableNotification notification =
2new Messaging.ActionableNotification.Builder()
3.withNotificationTypeId('0MLXXXXXXXXXXXX4AC')
4.withActionIdentifier('testAction')
5.withRecipientId('005XXXXXXXXXXXX')
6.withSenderId('005XXXXXXXXXXXX')
7.withTargetId('500XXXXXXXXXXXXYAI')
8.withTargetPageRef('/lightning/r/Case/500XXXXXXXXXXXXYAI/view')
9.build();

ActionableNotification Methods

The following are methods for ActionableNotification.

getActionIdentifier()

Return the unique action identifier (API name) for the custom notification action.

This actionIdentifier must belong to the action group associated with the custom notification.

Signature

public String getActionIdentifier()

Return Value

Type: String

getNotificationTypeId()

Return the ID of the custom notification type used for the notification.

Signature

public String getNotificationTypeId()

Return Value

Type: String

getRecipientId()

Return the user ID of the recipient of the notification.

Signature

public String getRecipientId()

Return Value

Type: String

getSenderId()

Return the user ID of the sender of the notification.

Signature

public String getSenderId()

Return Value

Type: String

getTargetId()

Return the record ID for the target record of the notification.

Signature

public String getTargetId()

Return Value

Type: String

getTargetPageRef()

Return the PageReference for the navigation target of the notification.

Signature

public String getTargetPageRef()

Return Value

Type: String