Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Email template for Custom Entities

Posted on by 1,695

CRM 2016

I am looking for a 'solution' to be able to create an email template for a custom entity.

We receive files from our customers which are processed and imported into our CRM into a custom entity and we then produce a pdf report for the customer. I'm looking to try and automate the emailing of the report. I have spent a day reading and trying different things to create an email template but with no success

I have tried importing the crmcustomermails.zip solution, but it just hangs and doesn't import. I have also downloaded the dynamics-custom-emails-master.zip and tried to import this and again this fails.

I'm running CRM 2016 On-Premises.

Does anyone know of any 'solutions' available that I could look at, or assist in why the two solutions I have tried wont import.

*This post is locked for comments

  • Nirav Shilu Profile Picture
    Nirav Shilu 20 on at
    RE: Email template for Custom Entities

    Hi, the email template i want to edit has some table in [xyz] and that i think fetches the dynamic value in a form of a table only issues is the time value fetched in the template via that [ ] is different than it should be. where will i be able to administer the settings for the dynamic value [ ]

  • Nirav Shilu Profile Picture
    Nirav Shilu 20 on at
    RE: Email template for Custom Entities

    Hi, I am trying to figure out the timing issues populated on email template

    i have found the template setting but cannot figure out what where the data is fetched in a form of a table

    please see example below

    Dear {Full Name(Contact (primary) (Contact))}

    I am pleased to confirm the details of the interview session we have arranged for you for your recent apprenticeship vacancy.  

    The names and details of the applicant(s) who have been invited to attend are as follows:

    [TableOfApplicants]  ??? where will i find this and check what data is being fetched using this template

    Applicants have been asked to attend at this address:

    [EmployerAddress] and to ask for {Contact (primary)(Vacancy)} when they arrive.

  • Pete_N Profile Picture
    Pete_N 1,695 on at
    RE: Email template for Custom Entities

    Hi Kokulan,

    have to admit, although I have previously created an email and attached a file to it from  a vb workflow, I cannot get my head around how to use the dxtool in this respect.  

    for excmple;

    I have a record in new_testentity with a pdf attachment in the notes field.  I have created a workflow that uses a template , creates and sends an email. and ( from you help ) the body of the email contains data from that record.  I am using the DXToolsCreateCustomEmail  tool. One of the properties parameters  is 'attachments' , which i would presume would be to add an attachment

    I apricate i have taken up a lot of your time already, but if you are able to assist, I would be most grateful ( and I'll learn something new )  

  • Suggested answer
    Kokulan Profile Picture
    Kokulan 18,048 on at
    RE: Email template for Custom Entities

    Hi

    Yes you can definitely attach PDFs to email you create using dxtools.

    Are these static PDFs or are you going to generate them dynamically.  I am going to assume they are static

    To attach document to email, you just have to create a activitymimeattachment record with you content and objectid and objectcode set to link to email

    Have a look at the link below

    community.dynamics.com/.../create-email-message-with-attachment-from-a-note

  • Pete_N Profile Picture
    Pete_N 1,695 on at
    RE: Email template for Custom Entities

    Hi Kokulan

    One last question on this. Part of what we do is email reports out to our customers, each report is generated daily and all the reports have different names ie Report + transaction number pdf.  Currently prior to learning to use email templates,  I have been generating the PDF reports to a file directory and generating the emails and attaching the pdf in a custom work code .. its not pretty. I know I can use the notes in the entity and store the pdf against the related record. With this in mind, using an email template, and the sample workflow in the dxtools documentation, do you know if it is possible to use the template with no attachment and then add a pdf attachment when the email is generated using the dynamic name ?

  • Pete_N Profile Picture
    Pete_N 1,695 on at
    RE: Email template for Custom Entities

    Sir, you are a legend ! Thank you so much, I can now sit here and start compiling templates and cut down on the manual work.

  • Verified answer
    Kokulan Profile Picture
    Kokulan 18,048 on at
    RE: Email template for Custom Entities

    Hi

    To insert values from the current entity, you can just use the field name as it is  eg: {new_simpletextfield}

    To insert a value from a related entity via a lookup field eg : {new_licenceid.new_name}   red is lookup field name on the current entity and blue is the field on the related entity. You can insert a value from any field in the related entity. 

    To Insert a an option set label from current entity : {new_category.label}

    To Insert a an option set lable from related entity : {new_licenceid.new_category.label}

  • Pete_N Profile Picture
    Pete_N 1,695 on at
    RE: Email template for Custom Entities

    Hi Kokulan,

    Thank you for all your help earlier. I'm slowly learning my way round DXTools emails. One problem I cannot seem to resolve

    I'm generating the email from an entity new_transactionsets    I have a field new_licenceid which is a 1:N relationship from Account entity.  I would like to get the 'name' and 'new_companyname' values, how would I do this.

    all I can work out from the example is something like {new_licenceid.accountid.name}  but this returns nothing.

  • Pete_N Profile Picture
    Pete_N 1,695 on at
    RE: Email template for Custom Entities

    Thank you for all your help

  • Verified answer
    Rawish Kumar Profile Picture
    Rawish Kumar 13,756 on at
    RE: Email template for Custom Entities

    So it will be

    {!new_transactionsets:new_createdon/@date;}  

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans