You need to sign in to do that
Don't have an account?
Easy Email question
I'm working on a visualforce email template. I'm having a problem pulling the account name. Here's what I tried:
<messaging:emailTemplate subject="Send Catalog" recipientType="User" relatedToType="Contact"> <messaging:plainTextEmailBody >
...
Name: {!relatedTo.Name} Email: {!relatedTo.Email} Title: {!relatedTo.Title} School: {!relatedTo.Account__r.Name} Street: {!relatedTo.MailingStreet} City/State/Zip: {!relatedTo.MailingCity}, {!relatedTo.MailingState} {!relatedTo.MailingPostalCode}
...
</messaging:plainTextEmailBody> </messaging:emailTemplate>
I'm having problems here:
School: {!relatedTo.Account__r.Name}
Anyone know how to pull the account name when recipientType="User" relatedToType="Contact"?
Try this:
School: {!relatedTo.Account.Name}
For relationships between standard objects, there is no "__r" in the relationship name.
All Answers
Try this:
School: {!relatedTo.Account.Name}
For relationships between standard objects, there is no "__r" in the relationship name.