function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Lady_PirateLady_Pirate 

Creating Email Template and want to include contact - need help

I am creating an email to send as a follow up to an opportunity.  I have the opportunity name, date and user info already. I am trying to add the opportunity's contact in the email merge.
 
I go to the opportunity and select create email and then pick my template. I want the contact to merge into the email. Right now the contact is viewed in the opportunity through contact roles.
 
Any thoughts??? Please help!
 
NPMNPM

Wedo not use opportunities so forgive me if my suggestion is way off base due to ignorance. . .

When building your template does selecting the contact merge fields not give you the contact information?

VeMan1542VeMan1542
Did someone else ever respond to this outside of the Community Forum, or did you ever figure this out on your own?
 
I am trying to do exactly the same thing. I'm trying to use an sforce.connection.query to gather the information about the Contact Role name in the Opportunity, then place that value into the "To:" field in an Email created from an Opportunity.
 
Ideally the whole thing should run in a URL, with the Contact name added as a &parameter, just as the Opportunity Name is added, or the Contact Name is added when creating an Email from a Contact record.
 
So far, I haven't been able to do either correctly, so I would really appreciate it if you could share any solutions you may have come across.
Lady_PirateLady_Pirate

Yes, I did get help with this and I will do my very best to try and explain what we did.

1st - in the contact page setup the opportunity field was edited and the standard button "new" was removed. This was done because we had to create another opportunity field with a custom button. I just use the existing (original field) for basic info on the opportunity.

2nd - added another opportunity related list (in the related list section on the contact page layout) with a custom button (listed is what you enter in setup, Opportunities, Custom Button or Link). This allows the opportunity to be populated with the contact name and can be mail merged into a template.

Label: New

Link Encoding: Unicode (UTF-8)

Name: New

Display Type: List Button

Behavior: Display in existing window without sidebar or header  

Button or Link URL:

 /006/e?
CF00N70000001m4vz={!Contact.Name}&
CF00N70000001m4vz_lkid={!Contact.Id}&
opp4={!Account.Name}&
opp4_lkid={!Account.Id}&
retURL=%2F{!Contact.Id}&
conid={!Contact.Id}

Let me know if this works for you. I hope I was able to explain this in an understandable manner. It seemed like such a simple request....:smileytongue: