0

I have a custom email address field on Account called Primary Email Address. We have also created a custom object off of account called Purchases. I want to be able to send an email to the Primary Email Address field on account every time a new Purchase record is added. Essentially, I want to walk up the child-parent relationship like so

Purchase__c.Account__r.Primary_Email_Address__c

However, it appears Salesforce doesn't allow for this. The "Recipient Type" drop down options do not include related object fields.

I can obviously do this with APEX, but I don't want to. I could also create an email field on Purchase__c and copy the Primary_Email_Address__c value using another workflow or APEX, but I'm trying to avoid duplicating data in objects.

Ideally, I would like to walk the relationship to get to Primary_Email_Address__c from Purchase__c.

3
  • the relationship would be, from Purchase__c : account__r.primaryEmail_Address__c
    – cropredy
    Commented Jan 29, 2015 at 20:00
  • Good catch. Are you also implying that this walk should be possible via Recipient Type? Commented Jan 29, 2015 at 20:35
  • 1
    are you trying to do this via a Workflow on Purchase__c with an Email Alert action? If yes, then you are correct. What you need is a workflow that first copies the value of Account__r.primary_email_address__c into a field of type Email on the Purchase__c, then a second workflow that executes the email alert using the Purchase__c.Primary_email_address__c
    – cropredy
    Commented Jan 29, 2015 at 21:47

1 Answer 1

0

As it turns out, it is not possible walk this relationship. What I ended up doing was creating an email field on the Purchase__c object, and using workflow to copy the email value from Account.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .