2

I am a newbie, and that's the probably reason why I am lost with this problem. I have two email templates created (one for students, and another for professorial). There is a custom object, and I need two custom buttons on this object tab to email both templates. Each template is using some custom fields from the custom object.

Template to professors is using these fields:

Placement__c.Field_Instructor__c Placement__c.Student__c

Template to students is using this:

Placement__c.Agency__c Placement__c.Field_Instructor__c

Can you please point me to the example, or explain here? Should I create SF custom button, or should I use Javascript button, and how to use it then? And how do I pass the parameters?

EDIT1 : I found this example, but questions remain: how do I trigger this process from custom object, how to use email templates with example, and how to pass custom object custom fields to template.

Apex send email example

EDIT2 : Well, I got something working, but I'd like to know what parameters' tags correspond to email template fields (e.g. p5, p24 etc.). Where can I find this ?

/_ui/core/email/author/EmailAuthor?rtype=003&p3_lkid={!Placement__c.Id}&retURL=%2F{!Placement__c.Id}&p26={!Placement__c.Student_email__c}&p5={!Placement__c.Student_email__c}&p24=" {!Placement__c.Student_email__c}&template_id=00Xe0000000M2FH

I could not figure out parameter to populate "To" field:

enter image description here

EDIT 3: I found what I was looking for here: http://forcetips.blogspot.com/2013/02/url-hack-to-send-email-by-simple-button.html

Thanks a lot.

1

1 Answer 1

2

You can do this a number of ways..

  1. The easiest is to use AMartin's hack here: https://success.salesforce.com/questionDetail?qid=a1X30000000KDqCEAW I use the term hack deliberately, because salesforce may not support this in the future.
  2. Create a visualforce button that updates a field on the record and fires off a workflow email alert. You can choose the email template that email workflow alert fires off of.
1

You must log in to answer this question.

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