Creating Email Template for sending Emails for Custom Entities in D365.

Hello Guys,

In our previous blog we have seen how to create Email Templates. Today we are going to see how we can create Email Templates for Custom Entities.

But before do follow us to know more about Dynamics and Power Platform. Also if you like our blog then please comment and share this blog with your friends.

Consider a scenario where we have one custom entity named "Employee" and we want to send an email to the employee for confirmation of their detail information provided by employee whenever a new employee record is created. To achieve this we need to create an email template first.

First of all visit https://make.powerapps.com and select your environment and current working solution.



Now click on New and select Email Template.



This will open a new window. While creating Email Templates we are selecting entities as shown in below:



As you can see our employee entity is not visible. In this scenario we need to select "Global" option for working with custom entities. Select Global and click on Ok.



Now specify the information as shown above and click on Save. Now we will creating content for the body. Scroll down and specify the content.



Here you will notice that when we click on Insert Dynamic Text button we can's see our custom entity and it's field. In this situation we need to type it manually.

To do so we need to follow below syntax:

{!<EntityLogicalName>: <FieldLogicalName>; <Default Text or Value>}



Here we used,

{!blg_employee:blg_name;Mam/Sir}

Now we will see how to add other field type. You can follow below syntax for various types:

Text field

{!<EntityLogicalName>: <FieldLogicalName>; <Default Text or Value>}

OptionSet field

{!<EntityLogicalName>: <FieldLogicalName>/@name;}

Lookup field

{!<EntityLogicalName>: <FieldLogicalName>/@name;}

Datetime field

{!<EntityLogicalName>: <FieldLogicalName>/@date;}

Boolean field

{!<EntityLogicalName>: <FieldLogicalName>;}



Here we used below text based on above syntax.

Name

{!blg_employee:blg_name;}

Address

{!blg_employee:blg_address;}

City

{!blg_employee:blg_city/@name;}

Marital Status

{!blg_employee:blg_maritalstatus/@name;}

Gender

{!blg_employee:blg_gender/@name;}

Birthdate

{!blg_employee:blg_birthdate/@date;}


So now our template is ready. In our upcoming blog we will see how to use this template using Power Automate Flow.


Hope it helps...


Comments

Popular posts from this blog

Read Only Sub Grid & Editable Sub grid in Dynamics 365

Using Pipelines in Power platform for deploying solutions to environments.

Understanding Sales Process in D365.