In the latest blog from our Dynamics 365 practice, Rohan Perera gives us some detail on how to make tables in a global email template for a custom entity in Dynamics 365 (Microsoft Dataverse).

When you want to create a table in an Email Template it is not obvious how to, there are many useful blogs available for this purpose and mostly involve in using HTML. 

This blog describes how to perform this task fast and without requiring any HTML knowledge.

Pre requisite: Make sure that this entity configured as bellow to use as an activity and to send emails.

1. Create a new D365 Global Email Template.

Detailed description available in this link.

2. Create a new Outlook email and insert a table.

3 . You can customise the table as required

Add or adjust rows and columns, Change Fonts type and Font size etc…

4. Select and copy the entire table (from the new email) and paste it to the D365 “Global Email Template” body.

5. Insert the field values as shown above.

Field values format: {!EntityLogicalName:FieldLogicalName;}

Text Field: {!EntityLogicalName:FieldLogicalName;}

Date Field: {!EntityLogicalName:FieldLogicalName/@date;}

Time Field: {!EntityLogicalName:FieldLogicalName/@time;}

Lookup Field (primary name field): {!EntityLogicalName:FieldLogicalName/@name;}

Option Set Field (text/label value): {!EntityLogicalName:FieldLogicalName/@name;}

Two Option Field (text/label value): {!EntityLogicalName:FieldLogicalName/@name;}

6. Save the Email Template.

When saving, the system will validate all the field values.

Usage of Email Templates

  • You can insert this email template in an email created for a record of this entity type.
  • Sending emails through ‘Power Automate’ Flows using a global email template.

e.g.

{
	"email_activity_parties": [
		{
			"partyid_<EntityLogicalName>@odata.bind": "/<EntitySet>(<RecordID>)",
			"participationtypemask": 1
		},
		{
			"partyid_<EntityLogicalName>@odata.bind": "/<EntitySet>(<RecordID>)",
			"participationtypemask": 2
		}
	],
	"@@odata.type": "Microsoft.Dynamics.CRM.email"
}