Introduction

In this blog, we’ll see how to use Relative URLs in Dynamics 365 CRM Classic Web, and Dynamics 365 CRM Unified Interface, and the difference between the two while opening a Relative URL.

There are some entities in Dynamics 365 CRM which are not directly available or accessible on the SiteMap (e.g. Document Template, Email Template, etc.)

Use of Relative URLs in Dynamics 365 CRM Classic Web & Unified Interface SiteMap

Use of Relative URLs in Dynamics 365 CRM Classic Web & Unified Interface SiteMap

So we can make them accessible or available directly by adding its Relative URL in the SiteMap.

Let’s take example of Document Template entity, where we’ll use its Relative URL, and add the same in SiteMap i.e.  “/main.aspx?etn=documenttemplate&pagetype=EntityList” (see images below).

Use of Relative URLs in Dynamics 365 CRM Classic Web & Unified Interface SiteMap

Use of Relative URLs in Dynamics 365 CRM Classic Web & Unified Interface SiteMap

Use of Relative URLs in Dynamics 365 CRM Classic Web & Unified Interface SiteMap

As you can see, by using Document Template’s Relative URL, we are able to open it in Classic Web. Now let’s take a look on how to achieve the same in Dynamics 365 CRM Unified Interface.

I’ve already created a Model-Driven App to perform the above in Unified Interface. I have used the same Relative URL which I used in Classic Web i.e. “/main.aspx?etn=documenttemplate&pagetype=EntityList

Use of Relative URLs in Dynamics 365 CRM Classic Web & Unified Interface SiteMap

But when I click on it, I get the below error.

Use of Relative URLs in Dynamics 365 CRM Classic Web & Unified Interface SiteMap

I entered the URL which I used in Classic Web but the same URL isn’t working in my Model-Driven app.

So after extensive debugging, I found out that the pagetype entered i.e. pagetype=EntityList is wrong, and it needs to be in lowercase.

Use of Relative URLs in Dynamics 365 CRM Classic Web & Unified Interface SiteMap

So after changing the Relative URL to lower case “/main.aspx?etn=documenttemplate&pagetype=entitylist”, it worked like a charm.

Use of Relative URLs in Dynamics 365 CRM Classic Web & Unified Interface SiteMap

Use of Relative URLs in Dynamics 365 CRM Classic Web & Unified Interface SiteMap

Conclusion

As illustrated above, you can access the entities such as Document Template, Email Template, etc. on SiteMap with the use of Relative URLs. However, Relative URLs are case sensitive in Unified Interface. Make sure to enter proper Relative URL to avoid issues.