Hello, i want to create an email tempale in crm like gmail and outlook, i flow this link ,
and i create my tempalte ,and javascript function to execute the tempalte in my email on load form, but i have an xmldocument error,
this is my code
function InstatiateEmailTemplate(tempaltid) {
var userId = Xrm.Page.context.getUserId();
var Soapreq = "<request i:type='b:InstantiateTemplateRequest' xmlns:a='schemas.microsoft.com/.../Contracts' xmlns:b='schemas.microsoft.com/.../Contracts'>" +
"<a:Parameters xmlns:c='schemas.datacontract.org/.../System.Collections.Generic'>" +
"<a:KeyValuePairOfstringanyType>" +
"<c:key>TemplateId</c:key>" +
"<c:value i:type='d:guid' xmlns:d='schemas.microsoft.com/.../Serialization'>" + tempaltid+ "</c:value>" +
"</a:KeyValuePairOfstringanyType>" +
"<a:KeyValuePairOfstringanyType>" +
"<c:key>ObjectType</c:key>" +
"<c:value i:type='d:string' xmlns:d='www.w3.org/.../XMLSchema'>systemuser</c:value>" +
"</a:KeyValuePairOfstringanyType>" +
"<a:KeyValuePairOfstringanyType>" +
"<c:key>ObjectId</c:key>" +
"<c:value i:type='d:guid' xmlns:d='schemas.microsoft.com/.../Serialization'>"+userId+"</c:value>" +
"</a:KeyValuePairOfstringanyType>" +
"</a:Parameters>" +
"<a:RequestId i:nil='true' />" +
"<a:RequestName>InstantiateTemplate</a:RequestName>" +
"</request>";
var result = XrmServiceToolkit.Soap.Execute(Soapreq);
window.alert(result);
Xrm.Page.getAttribute('description').setValue(result);
}
*This post is locked for comments
I have the same question (0)