You need to sign in to do that
Don't have an account?
skp
Cannot get this simple MassEmailMessage to work - any clues
stringQuery = "select Id from emailtemplate where name = 'TestNotification'";
result = sforce.connection.query(stringQuery);
var templateId = result.getArray("records")[0].Id;
alert("Template ID: "+templateId);
var massRequest = new sforce.MassEmailMessage();
massRequest.targetObjectIds = toIDsArray;
massRequest.templateId = templateId;
var sendMailRes = sforce.connection.sendEmail([massRequest]);
for (i=0; i< toIDsArray.length; i++)
{
alert("Email sent to user id: "+toIDsArray[i]);
}
I can see (through the alerts that the TemplateId and User IDs are correct)
Thanks in advance
I am getting the email now after I set the following
massRequest.saveAsActivity = false;
But, I do not get the values from the Object (custom object), that I referencing in the Email body!
Any ideas?