I need to find a way to leverage the email options to set the default From address on an Email compose drawer.
Occasionally the user will need to change the From so the other options should remain, but the default needs to be the queue on the case.
I have several custom email compose buttons on the Email subpanel on Cases:
Internal Compose, Compose, Reply.
Each populates a number of fields like To, Subject, Body, and relates the email to the Case.
I do this via a custom API that returns an array:
$composePackage = array(
'to_addresses' => $toAddresses,
'parent_type' => $parent_type,
'parent_id' => $parent_id,
'parent_name' => $parent_name,
'subject' => $subject,
'html_body' => $body_html,
'body' => $body,
and $toAddresses is itself an array, for example:
This is used by a custom field type which is an extension of EmailactionFrield and opens the drawer with everything in place.
So, any thoughts on how to get the from default to be passed correctly to the EmailOptions?