You need to sign in to do that
Don't have an account?
unikevin
SingleEmailMessage Error
Hi,
I'm trying to send email throw Ajaxtools, but I get the error code beolw:
faultcode: soapenv:Client
faultstring: Element type "this.length" must be followed by either attribute specifications, ">" or "/>".
here are some code: ( form ajax toolkit guide)
var singleRequest = new sforce.SingleEmailMessage();
singleRequest.replyTo = "jsmith@acme.com";
singleRequest.subject = "sent through ajax test driver";
singleRequest.plainTextBody = "this test went through ajax";
singleRequest.toAddresses = [uni@protime.com.cn];
var sendMailRes = sforce.connection.sendEmail([singleRequest]);
singleRequest.replyTo = "jsmith@acme.com";
singleRequest.subject = "sent through ajax test driver";
singleRequest.plainTextBody = "this test went through ajax";
singleRequest.toAddresses = [uni@protime.com.cn];
var sendMailRes = sforce.connection.sendEmail([singleRequest]);
Anyone can help me?
thanks!
sorry,
singleRequest.toAddresses = ['uni@protime.com.cn'];
It links to some sample scontrol code to send emails
thanks! I find a bug in AJAX Toolkits.
if the "toAddresses" only contains one email address, the toAddresses can't be an Array, it only can be a String! otherwise the "toAddresses" in SOAP message will be "for(var i=0;i<xxx.length;i++)..." then I get the error...