How to create Custom Buttons to send an Email-to-anything Email


Custom Button to send an Email

It is often the case that an organization has to send out some fixed format emails. Instead of recreating those emails each time, a custom button can be set up to automatically load email client with required information.

There are parameters set for almost all fields of an Email. Each parameter can be fixed according to the requirement. Please find the list of the parameters below for further information.

Parameters of Email Client's Fields

Here is the list of parameters which can be set accordingly. 

 

Parameters
Respective Fields
p4 CC
p5 BCC
p6 Subject
p7

Body

to

To

e.g. 

  • to=setBlank
  • to=0345XXXXX<SF ID>
  • to =email@address.com
tags Tag Name

p3_lkid

Related Object Id (e.g. opportunity, account etc.)

p2_lkid  

To (Contact or lead)

p24 

Additional To
p26 From Address

template_id 

Id of the Template to be load

bu_id 

Business Unit Id

retURL 

Return URL if Cancel is pressed

obj_name 

Object API name of email record object (ortoo_e2a__emailmessage__c in case of central email)
replyToAll
  • replyToAll = 0 (to reply only to From Address)
  • replyToAll = 1 (to reply all)
isrichtext
  • isrichtext = true (HTML Email Editor)
  • isrichtext = false (Plain Text Email Editor)

 

Example of a Using Parameters in a Custom Button URL

Button or Link URL          /apex/ortoo_e2a__EmailClientInit?obj_name=ortoo_e2a__EmailMessage__c&to=setBlank&isrichtext=true&p4=support@ortooapps.com

 

By using the above mentioned URL, 'To' field of Email Client will be set blank, 'Email Editor' will be HTML editor and 'CC 'field will be populated with the mentioned email address. 

 

How to create the Custom Button? 

To set these buttons, please find guideline below:

By using the above mentioned URL, 'To' field of Email Client will be set blank, 'Email Editor' will be HTML editor and 'CC' field will be populated with the mentioned email address. 

  1. For standard Objects go to Setup | <object name> | Buttons, Actions, and Links
  2. For custom objects go to Setup | Object | <Object Name> and scroll down to Buttons, Links and Actions section
  3. Press New Button or Link
  4. Fill all the required fields as per requirements

 

Please contact us at support@ortooapps.com with any questions.

Was this information helpful?

The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. Please make sure you spelled the page name correctly or use the search box.

Support