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

By | September 18, 2019

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.

2 thoughts on “Use of Relative URLs in Dynamics 365 CRM Classic Web & Unified Interface SiteMap

  1. David

    Thank you for your post, it’s very useful.

    However, the functionality does not work properly, because if you click any of the buttons on the ribbon (for example, NEW button) an error message because of the library is displayed:

    Invalid JavaScript Action Library: /_static/_common/scripts/RibbonActions.js is not a web resource and is not supported.

    Reply
    1. Inogic Post author

      Hi David,

      The url have since changed in the new Unified interface. You can check the new url that it navigates to and add that to the sitemap to get it to work.

      it would be similar to https:///_root/homepage.aspx?etc=9940

      HTH

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *