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

Send email to 4 email addresses using custom Button

I want to send an email to 4 email addresses from a custom button.  


I have a custom detail page button, execute javascript that sends email based on the ID and a workflow.  


How do I create a button like this to send to email addresses instead?  


2 of the email addresses can be referenced from the fields on the object and the other 2 are external email addresses not referenced on the object . . .


This is the current code:



var result = sforce.connection.query("Select Id, Send_RTA_Declare_Form__c From PAF__Personnel_Action__c where Id = '{!PAF__Personnel_Action__c.Id}' ");

var records = result.getArray("records");

//alert ( records );

records[0].Send_RTA_Declare_Form__c = true;
result = sforce.connection.update(records);

window.location = window.location;


Thanks in advance for any feedback.


Marko LamotMarko Lamot

are you asking how to send an email via javascript?



I want to send an email using a custom button that uses java script.

Marko LamotMarko Lamot



see "sendEmail Example" at the bottom of this page: