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)

Get Template used to send an email

(0) ShareShare
ReportReport
Posted on by 310

Hi,

I am developping a console application that iterates email on crm online and try to find the template used to send an existing email.

I tried to look in all the email Entity attributes and didn't get the template entity or the template id used.

How can I find it please ?

Thanks,

Mounir

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    As far as I know such information is not stored. Why do you need it?

  • Mounir Profile Picture
    310 on at

    I want to send another email using a template Y if a lead has received an email using a template X.

    If it is not possible to know "using which template an email was sent" , is there a way to run a custom plugin when an email is being sent using a template X ?

    If yes, i will add a custom field on the email entity which will contains the template id used to send the email.

    Thank you for your quick answer.

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    You can develop plugin that will handle SendFromTemplate message.

  • Mounir Profile Picture
    310 on at

    Yes I know that. I use SendFromTemplate to send emails using template. But this is not my problem.

    I want to know if an email was sent using a template? If Yes, using which template ?

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    It is not tracked by default anywhere what template was used to send an email. To resolve that issue to track that information you can create a plugin that will handle SendFromTemplate message and save information about template used inside an email to use that information after.

  • Mounir Profile Picture
    310 on at

    I am sending emails using default dynamics crm fonctionnalities.  

    Thank you for the answer but your idea will force me to redevelop all the email sending process to resolve the problem.

    I think there is a way to get the template id when the user create/update an email, on the moment when he select the template to use for the email. May be I can save it using javascript in a custom email field ?

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    I don't suggest to "redevelop all the email sending process". I suggest following steps:

    1. Create custom field to store information about template that was used to send an email.

    2. Develop a plugin that will handle SendFromTemplate message and store information about used template inside email record.

    You can try to store that information using javascript but I'm pretty sure that it would not work. How your javascript will work in case email is sent from workflow or .Net code? My solution resolves that issue. Your approach with JavaScript - not.

  • Mounir Profile Picture
    310 on at

    I am still working with the microsot support team to solve the problem using javascript

  • Lokin Shah Profile Picture
    55 on at

    Hi, Were you able to find a solution?

    I see a new attribute Template Id in email entity

    But it says internal use only and I am unable to find it in Advanced find.

  • Sohil Doshi Profile Picture
    65 on at

    Yes, the templateid option only gets populated when the email is created manually. When we create the email manually in the dynamics crm and select the insert template option, then only this field gets populated. I dont know why Microsoft has not done when email sent through workflow using template!!

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