ActionableNotification.Builder Class
Namespace
Example
See the example for the Messaging.ActionableNotification class.
ActionableNotification.Builder Methods
The following are methods for ActionableNotification.Builder.
build()
Signature
public Messaging.ActionableNotification build()
Return Value
withActionIdentifier(actionIdentifier)
Signature
This actionIdentifier must belong to the action group associated with the custom notification.
public Messaging.ActionableNotification.Builder withActionIdentifier(String actionIdentifier)
Parameters
- actionIdentifier
- Type: String
- The API name of the action.
Return Value
withNotificationTypeId(notificationTypeId)
Signature
public Messaging.ActionableNotification.Builder withNotificationTypeId(String notificationTypeId)
Parameters
- notificationTypeId
- Type: String
- The ID of the custom notification type being used for the notification.
A notification type is required to send a custom notification.
Return Value
withRecipientId(recipientId)
Signature
public Messaging.ActionableNotification.Builder withRecipientId(String recipientId)
Parameters
- recipientId
- Type: String
- The user ID of the notification recipient.
Return Value
withSenderId(senderId)
Signature
public Messaging.ActionableNotification.Builder withSenderId(String senderId)
Parameters
- senderId
- Type: String
- The user ID of the sender of the notification. Setting a sender is optional.
Return Value
withTargetId(targetId)
Signature
You must specify either a targetID or a targetPageRef.
public Messaging.ActionableNotification.Builder withTargetId(String targetId)
Parameters
- targetId
- Type: String
- The ID of the target record.
Return Value
withTargetPageRef(targetPageRef)
Signature
You must specify either a targetID or a targetPageRef.
public Messaging.ActionableNotification.Builder withTargetPageRef(String targetPageRef)
Parameters
- targetPageRef
- Type: String
- The target page reference as a URL string, for example '/lightning/r/Case/500XXXXXXXXXXXXYAI/view'. For more examples, see pageReference Types.