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 :

Insert custom entity fields in Email template

Charles Abi Khirs Profile Picture Charles Abi Khirs 3,569

Working with Email Templates is very common and saves a lot of time especially if you have similar emails to send from CRM.

The email templates are by default provided for some built-in entities that are listed when you create the template; however, when working with custom entities, it is not straight-forward and you have to do some additional work to make it done.



To show you how to add custom entity fields in Email template content, I will create a new custom entity named Project and I will use some fields in order to build the email content.

1. In CRM Settings > Templates > Email Templates, create a new template and choose Global for Template Type

2. In the Template screen, enter the Title of the template and the Subject of the email that will be sent

3. To build the email content, I need the Customer name (lookup), Project name (text), Budget (currency), and Estimated Delivery Date (date time)

To do so, you have to use the following format in order to resolve the values of the needed fields: {!EntityLogicalName:FieldLogicalName;}

For my example:

  - Customer Name (lookup): {!new_project:new_customerid/@name;}

  - Project name (text): {!new_project:new_name;}

  - Budget (currency): {!new_project:new_budget;}

  - Estimated Delivery Date (Date Time): {!new_project:new_estimateddeliverydate/@date;}


4. Click Save and you will notice that the dynamic values will be resolved displayed in yellow


5. Let's test it by creating a new workflow and sending an email when a new project record is created



6. Create a new project record and check the Activities. As expected, the correct values of the project record will be properly displayed in the email content



Bonus Tips:
1. You can also use the template directly from the email activity screen by clicking Insert Template
2. To display option set values: {!EntityLogicalName:FieldLogicalName/@name;}
3. To display Date values: {!EntityLogicalName:FieldLogicalName/@date;}
4. To display Time values: {!EntityLogicalName:FieldLogicalName/@time;}
5. To display default text value: {!EntityLogicalName:FieldLogicalName; Default text}
6. Use the button Insert/Update in the template to choose fields from the user entity only


Hope this Helps!

This was originally posted here.

Comments

*This post is locked for comments