Hello Experts,
My requirement is to add ana attachement to the email ,I am using the following code for create activity MIME atachement using javascript.I am able to create attachement but I am not able to write the contents to that attachment ,How can I do that .(iam using Body attribute for email attachment but no contents are passed to that attacement. any one please suggest how can I do that. I pasted my code here.
function CreateEmailAttachment(actvid) {
//get reporting session and use the params to convert a report in PDF
// var params = getReportingSession();
debugger;
//Email attachment parameters
var activitymimeattachment = Object();
activitymimeattachment.ObjectId = Object();
activitymimeattachment.ObjectId.LogicalName =
"email";
activitymimeattachment.ObjectId.Id = actvid;
activitymimeattachment.ObjectTypeCode =
"email",
activitymimeattachment.Subject =
"File Attachment";
//activitymimeattachment.Body = "Sample content";
//SaveAsFile();
var sample="Hello World";
// activitymimeattachment.Body = sample;
activitymimeattachment.FileName =
"Provider Route Information.txt";
//activitymimeattachment.Body = encode64("data");
var data="hhjhjshghdghsdghs";
//activitymimeattachment.Body = encode64(data);
//Attachment call
//activitymimeattachment.MimeType = "application/txt";
activitymimeattachment.MimeType =
"text/plain";
SDK.JQuery.createRecord(activitymimeattachment,
"ActivityMimeAttachment", ActivityMimeAttachmentCallBack, errorHandler);
Thanks and Regards
Muralikrishna