Skip to content Skip to main navigation Skip to footer

Using ‘Email To’ feature from Person Accounts with Different Base Object in Document Action

Full Use Case: 
I am using Opportunity as my base object in document action and want to send the ’email to’ the Person Account contact that is listed under my Opportunity. Since the ‘Email To” field uses only Lead or Contact ID, what should I do so that it merges the Contact from the Person Account?

If you are wanting to merge your ’email to’ from a contact under Person Account but not using Account as your base object in document action, you will need to create a formula field under the object you are using for base object that will merge the needed ID field from Person Account.

In this example we are using Opportunity as the base object (though you can do this with any other standard or custom object) so take the following steps:

– Go to your Setup > Customize > Opportunity > create a new custom field.
– Then select “Formula” field and for type select “text.”
– Give the formula field a name like “Account Person Contact ID” so you can easily find it later. You don’t need to make this field visible on your page layouts unless you want too otherwise you can check box at top that will hide this field from all page layouts.
– Then click “Save.”
– Go back to your custom button code and now merge this formula field from your Opportunity object relationship.
– In this example, under “Select Field Type” click on “Opportunity” and then under “Insert Field” find your Account Contact ID field, for example:{!Opportunity.Person_Account_Contact_ID__c} then you would paste this field into your document action under the “Email To” field.
– Make sure you save the document action with new edit and then paste this new button code into your custom button that is on Opportunity page layout.

This way you are still using Opportunity as base object but merging the email recipient for contact ID from Person Accounts.