Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- General Development
- :
- Lookups and Email Template Merge Field Problem
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Lookups and Email Template Merge Field Problem
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-17-2013 05:32 AM
I am having a problem with an email template and merge fields. It all works fine until the bottom where the contact detail are listed. Essentially all fields in this template come from the Opportunity and I wanted to use the contact listed in the contact role on the Opportunity but there was no obvious merge field to use. I used the contact field below which are not populating.
Someone suggested using a lookup (Italics text below) to get the contact, which worked. I created a custom lookup field called Opportunity_Contact__c. The answer was missing the second part which was how to get the contact email and phone on to the Opportunity so it can then become part of the email.
I wasn't able to find anything that addressed this in my search of the boards. Any help would be appreciated.
The reason the above aren't working is because you aren't referencing the proper object. If you had a contact lookup on the opportunity the above would work. Because you are using contact roles and not Contacts, you actually can't pull the information from the contact Roles. The logic / reason why is because there could be multiple contact roles and there is no way to specify which information to pull.My suggestion (as mentioned above) would be to discontinue the use of Contact Roles and create a custom look up field for the contacts. Once the relationship is created you could then use merge fields.
Proposal Team:
Account Owner: {!Opportunity.OwnerFullName}
Proposal Coordinator: {!Opportunity.Proposal_Co__c}
Client Contact: Opportunity_Contact__c
Client Phone: {!Contact.Phone}
Client Email: {!Contact.Email}
Solved! Go to Solution.
Re: Lookups and Email Template Merge Field Problem
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-17-2013 07:37 AM
Never mind. Got it sorted......learning.

