Salesforce Quick Action: Setting the FROM Email Address using a formula

Business Case: Client has a lot of email-to-case addresses and wants their quick action ‘From’ to be preselected in order to cut down on clicks and ensure the email goes out from an address that is not the agent and that will be returned directly to Salesforce. Seems easy enough! When looking at the predefined field values for the email quick action it can get confusing as to which one to use and the correct formula to use so here’s how I solved it:

if(ISPICKVAL(Case.Origin, “Product_Name_1 Email”),
“Product_Name_1.support@your_domain.com”,
if(ISPICKVAL(Case.Origin, “Product_Name_2 Email”),
“Product_Name_2.support@your_domain.com”,
NULL))

The trick was using the ‘From’ field AND NOT the ‘From Name’ or ‘From Address’ AND using only the email address and not the name or name + email address (believe me I tried both). It was looking at the html source code of the New Predefined Values page that clued me in. Predefined Field Values on picklists are just so awesome!

3 Replies to “Salesforce Quick Action: Setting the FROM Email Address using a formula”

  1. Hi,

    Thanks for the help here but the above formula does not work when using “Forward” action, it uses logged in users Email address and not the predefined value set for “From”.

    Thanks,
    Darpesh

    1. I am sorry that did not work for you. Maybe they had different settings for their email? Unfortunately I no longer have access to that org/customer to investigate further.

Leave a Reply

Your email address will not be published. Required fields are marked *