3

I tried to send a email from a custom button in opportunity, but I can't send to a specific email, I want send automaticaly when I click in the button. I try this but don't work. I can't send to a specific email if don't have a contact into lookup field?

location.replace('/email/author/emailauthor.jsp?retURL=/{!Opportunity.Id}&p3_lkid={!Opportunity.Id}&[email protected]&template_id=00X11000000MMCZ&p5=&save=1')

Thanks.

1
  • When you say specific email, do you mean a fixed email address? Oct 27, 2014 at 20:49

1 Answer 1

1

If I understand your question correctly, you're correct that you probably need your button to have a reference context of a look-up to a contact, not just an email address. You'd need to verify this by looking at the code for the email template your button is linked to.

To make it work properly for your purposes, you might want clone it and modify it to use the OpportunityID as the WhatID of your email (or subject) and then your contact would be the WhoId.

6
  • how can I do that? WhoId?
    – lisyy
    Aug 22, 2014 at 13:11
  • Find the visual force template whose id=00X11000000MMCZ, open it, select clone, then save as. One of the fields might be the WhoId. The WhoId is the contactId that a Task, Email, Activity, etc is related to. Its useful for tracking purposes.
    – crmprogdev
    Aug 22, 2014 at 14:02
  • Not a visalforce Template, is a custom template. Just Work with visualforce template?
    – lisyy
    Aug 22, 2014 at 14:19
  • No, clone the custom template.
    – crmprogdev
    Aug 22, 2014 at 14:20
  • 1
    As I previously indicated, the WhoId may or may not have been included in coding the original template. The main thing is that you'll need to pass a ContactId with your Button to the template, not just the Opp Id.
    – crmprogdev
    Aug 22, 2014 at 14:26

You must log in to answer this question.

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