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.
|
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 |
|
isrichtext |
|
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.
- For standard Objects go to Setup | <object name> | Buttons, Actions, and Links
- For custom objects go to Setup | Object | <Object Name> and scroll down to Buttons, Links and Actions section
- Press New Button or Link
- Fill all the required fields as per requirements
Please contact us at support@ortooapps.com with any questions.
★★★★★ - EXCELLENT
★★★★☆ - GOOD
★★★☆☆ - OK
★★☆☆☆ - POOR
★☆☆☆☆ - RUBBISH