Dataverse: Remove the unmanaged layer of the Email Template

When you need to send Emails from Dataverse and have a specific format, you can use the Email Template component. Although this is not a new feature, most of us still using this, and just recently I stumbled into a situation where in one of the environments, there are lots of Unmanaged layers found in the Email Templates. And as you know, when there is an unmanaged layer found, if there is a new version of the Email Template being introduced from the Dev, it will not take the latest version which causes the problem. So today, I’ll explore how to find a way to update the version or get rid of the unmanaged layer.

Solution Setup In Environment 1

I create a new Solution layer in one of my environments. Then I created below Email Template:

Email template

Here are the Solution and the Email Templates I prepared for the demo:

Solution and the Email templates

Import In Environment 2

Once the customizations are ready on the dev environment > export the solution as managed > import the solution to Environment 2. After importing, I open one of the Email Template and update the content:

Update the Email Template that causes the Unmanaged layer

When we click the Save button, the Email Template will become Unmanaged. Dataverse itself can remove the Unmanaged layer (for Form, Ribbon, etc) that you can read here. But unfortunately, not all components support it. And one of them is Email Template. When you try to delete the Unmanaged layer, you will encounter the error below (RemoveActiveCustomization is not supported for components of type Template):

The Unmanaged layer's of Email template can't be deleted


Because the Email Template is like a record in CRM/Dataverse, I tried to delete the Email Template with the Unmanaged layer (if there is a component dependent on the Email Template, you will get an error):

After successfully deleting the Email Template, we can re-import the solution again. Here is the solution layer of the Email Template that previously had an Unmanaged layer (there is no unmanaged layer anymore 😎):



You also can uninstall the solution and re-import again to remove the Active layers of the Email Template (if your organization group the solutions by the component type. Eg Email Templates, plugins, web resources, etc.).

Happy CRM-ing!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.