Newer Version Available
QuickActionDefaultsHandler Interface
Namespace
Usage
To specify default values for the standard Email Action on Case Feed, create a class that implements QuickAction.QuickActionDefaultsHandler.
When you implement this interface, provide an empty parameterless constructor.
QuickActionDefaultsHandler Methods
The following are methods for QuickActionDefaultsHandler.
onInitDefaults(actionDefaults)
Signature
public void onInitDefaults(QuickAction.QuickActionDefaults[] actionDefaults)
Parameters
- actionDefaults
- Type: QuickAction.QuickActionDefaults[]
- This array contains only one item of type QuickAction.SendEmailQuickActionDefaults.
Return Value
Type: void
QuickActionDefaultsHandler Example Implementation
This is an example implementation of the QuickAction.QuickActionDefaultsHandler interface.
In this example, the onInitDefaults method checks whether the element passed in the array is for the standard Email Action on Case Feed. Then, it performs a query to retrieve the case that corresponds to the context ID. Next, it sets the value of the BCC address of the corresponding email message to a default value. The default value is based on the case reason. Finally, it sets the default values of the email template properties. The onInitDefaults method determines the default values based on two criteria: first, whether a reply action on an email message initiated the call to the method, and second, whether any previous emails attached to the case are associated with the call.