web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Signature email with javascript and email template

(0) ShareShare
ReportReport
Posted on by

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)
  • Robert Wittig Profile Picture
    1,885 on at

    I have never tried putting a signature in with JS but this method works really well, and probably easier to maintain in the long run.

    www.inogic.com/.../adding-signature-to-emails-in-dynamics-crm

  • yosra.walid Profile Picture
    on at

    Yes this is the same example i flowed , ididn't undestand how it get the description ??

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans