Introduction
With Dynamics CRM Tablet client now supporting web resource on tablet client, it is now also possible to open the CRM record through a hyperlink in the web resource.
It has been a common requirement that the custom web resources have the need to provide a link to the actual records being displayed. Until now to open the CRM record, we used the API call “Xrm.Utility.openEntityForm”. This would bring up the form with the specified record requested. This continues to work if you are accessing CRM through Web Client or Outlook client.
But when the link is clicked from the tablet client it throws following error:
Deep Linking
Upon further review of the SDK we found that in order to open entity record on mobile & tablet client, we need to generate links using Deep Linking. You can use deep linking in order to open the CRM record, forms, views, and dashboards from HTML web resource or from external applications.
Note: When you try to open it from external applications, it will ask to sign in to your Dynamics CRM instance in the CRM mobile client, if you are already not signed in.
For Deep linking and invoking the app to open the requested link the url should be generated in the following format
ms-dynamicsxrm://?pagetype=”pagetype”&etn=”entityname”&id=”entityid”
Below is the explanation of each query string parameter:
pagetype – This specifies page type values like entity, view, dashboard, and create.
etn – This specifies logicalname of entity.
entityid – This specifies entity guid.
Please refer below URL to open entity record, view, dashboard etc.
Open Entity Record:
ms-dynamicsxrm://?pagetype=entity&etn=lead&id=690C3819-A303-E611-8116-C4346BAD559C
Open view:
ms-dynamicsxrm://?pagetype=view&etn=lead&id=FD140AAF-4DF4-11DD-BD17-0019B9312238
Open Dashboard:
ms-dynamicsxrm://?pagetype=dashboard&id=45F88F83-0E67-443B-BD05-81D49719F6B1
Create a new record:
ms-dynamicsxrm://?pagetype=create&etn=lead
Send links through Workflow
It is a common practice to have workflows defined that would send out an email notification to users with a link to the record so that they can quickly click on the link and navigate the desired record.
The OOB Workflow designer has the option to “Insert Record Link” that automatically adds the link to the record.
But this link only works with the web client. Say we want to also add the mobile link so that users that are using tablet or mobile client can use the link to quickly open up the record in the app. For this we can generate the link through a custom workflow (Note the OOB workflow does not all the Guid to be added as a slug in the email) and to achieve this add keyword link #Tablet Client into email body as shown in below screenshot.
Pass this email as input parameter to your custom workflow assembly and in WF replace #Tablet Client with following
string tabletLink = “ms-dynamicsxrm://?pagetype=entity&etn=” + context.PrimaryEntityName + “&id=” + context.PrimaryEntityId + “”;
emailDescription += “<a href='” + tabletLink + “‘>Tablet Client</a> \n”;
And then update the email with updated email description (Email body) and Send email programmatically using SendEmailRequest request.
From within the app, you have the option to share the dashboard link. This will open up an email with the link prepopulated in the email body as shown in the screenshot below
When the hyperlink on the Sales Activity Dashboard is clicked, it will open the Sales Activity Dashboard on the tablet client if you have the tablet client installed.
Note: If you access Dynamics CRM from web client and you have added HTML web resource in that, you have added functionality to open the record/view/dashboard using deep linking and when you click it, it will show following window.
When you click on Launch Application button, it will open the record in Windows app.
Use the Web Link hyperlink to open the Sales Activity Dashboard on the default browser of the device. If you are not signed-in to CRM, you will be prompted to sign-in to CRM before the Dashboard is presented for viewing.
Note: The email example below is using default email client of the mobile device. It has been observed that the emails received in the outlook app strips off the hyperlink and they do not open the record in the mobile app.
Conclusion:
Deep linking is used for opening the entity record on Mobile and Tablet client. This can be used for opening the Dynamics CRM records, forms, views, and dashboards from external applications or HTML web resource.
Resources:
Have u tried new Maplytics August Release? If not, Download today!
Hi,
It’s very good article.
I have one query like, I have given static URL to create an record from Sitemap navigation in UCI. While user click on that sitemap navigation, it’s opening in new window. So can we open that url in existing window instead of new window?
Second question like: When we opening this UCI app in mobile MS CRM App, while user click on that Sitemap navigation link, it’s opening the browser instead of opening in mobile CRM app.
Thanks,
Vatsal
Please note for the navigation to work within the mobile app, it is important to generate the deep link for the crm record using the ms-dynamicsxrm://?pagetype=”pagetype”&etn=”entityname”&id=”entityid” syntax.
You will need to conditionally set the url based on the client type.