When I use Unified Service Desk with Microsoft Dynamics CRM 2016 it is quite common to need to construct a url to access a specific CRM form, view or dashboard, so in this post I thought I would describe the concepts around accessing these CRM elements using a url.
Note:
Whilst I have created this post using CRM2016, the same concepts can be applied to CRM2013 and CRM2015.
Loading Entity Forms
To load a contact new entity form you’d use the following url;
<<Your Connection String>>/main.aspx?etn=contact&pagetype=entityrecord#597270457
Note: <<Your Connection String>> would be replaced with one of the following;
- For on premise it would be something like http://your_server/your_org
- For on line it would be something like https://your_org.crm4.dynamics.com
To view a case (incident) with the id {7B38466BB4-2C9D-E511-80D3-D89D67634D48} you could use the following (Note that “{” and “}” have been replaced with “%7B” and “%7D”);
<<Your Connection String>>/main.aspx?etn=incident&pagetype=entityrecord&id=%7B38466BB4-2C9D-E511-80D3-D89D67634D48%7D
Navigate to a specific view
To navigate to a view for accounts with an id of %7b61273827-328E-E011-95AE-00155D9CFA03%7d use the following;
<<Your Connection String>>/main.aspx?etn=account&pagetype=entitylist&viewid=%7b61273827-328E-E011-95AE-00155D9CFA03%7d
Or to navigate to a view for accounts with an id of %7b61273827-328E-E011-95AE-00155D9CFA03%7d use the following
<<Your Connection String>>/main.aspx?etn=account&pagetype=entitylist&viewid=%7b61273827-328E-E011-95AE-00155D9CFA03%7d&viewtype=1039&navbar=off&cmdbar=false
To find the id of a system view, load the entity in customizations and double click on the view; (Note: I am using the Edge browser.)
Then you can grab the id from the url. Notice that the ID for the view is the one at the end. Don’t copy the solution id or entity id!
URL for a Dashboard
To display a system dashboard with the id %7bC378C42A-ED4D-4F60-9D17-F71B8BFB91DF%7d you can use the following;
<<Your Connection String>>/workplace/home_dashboards.aspx?dashboardId=%7bC378C42A-ED4D-4F60-9D17-F71B8BFB91DF%7d
To find the id of your dashboard, open customizations (using the Edge browser) and double click on the dashboard. As shown below;
Now you can copy the ID from the url of the dashboard. (Being careful to grab the GUID for the dashboard and not the solution!) See below;
etn v etc
Finally, a note on etc and etn ……
In all of my examples above I have used the syntax “/main.aspx?etn=account&….”, sometimes when you copy a url in CRM you may see etc used in place of etn. So “/main.aspx?etc=1&….”.
With etc being the numeric code representing an entity. Whilst this may typically work for system entities this approach can lead to issues with custom entities. As the numeric code can be different in different organisations. Therefore it is best practice to always reference entities by name using “etn”.
Hopefully this has been a useful post. J
Filed under: CRM2016, USD - Configuration Tagged: CRM, crm2016, Microsoft Dynamics CRM, Unified Service Desk, USD
