Reply
Regular Contributor
raskren
Posts: 16

Advanced merge fields

I'm creating an email template that pulls specific information from a custom object called "Referrals Provided."  Referrals Provided contains a lookup relationship to select an Account Name in the system.

What I need to do is pull the Account address, phone, fax, etc. and have that information displayed in the email.  I can get to the account name with this "{!Referrals_Provided__c.Account__c}" Is there a way to "crawl" up the relationship and get additional information from the account?  So far I have tried:

{!Referrals_Provided__c.ShippingAddress}
{!Account__r.ShippingAddress}
{!Referrals_Provided__c.Account__r.ShippingAddress}
{!Referrals_Provided__c.Account__c.ShippingAddress}
{!Referrals_Provided__r.Account__c.ShippingAddress}

None of which return anything.

Thanks.
Regular Contributor
tannershamrock
Posts: 11

Re: Advanced merge fields

Unfortunately, Email templates have not been a feature Salesforce has focused much on.  You might be able to use the field type dropdown to add fields from other objects, but I don't quite remember.  Give that a shot.  If it doesn't work, no you cannot do this.

- Tanner Shamrock
Regular Contributor
cpeterson
Posts: 28

Re: Advanced merge fields

[ Edited ]

This is really sad how underpowered standard email templates are. 

It's quite unimpressive that I have to use visualforce just to reference a merge field. 

Message Edited by cpeterson on 12-22-2009 02:17 PM