Showing posts with label D365 CE Tips. Show all posts
Showing posts with label D365 CE Tips. Show all posts

Saturday, August 22, 2020

D365 CE Tips: Enabling Mobile offline for users

 Microsoft provides details guide how to setup unified interface app for mobile and enabling offline capabilities. Please refer following Microsoft Document for setting up mobile capabilities for D365 CE.

 https://docs.microsoft.com/en-us/dynamics365/mobile-app/overview

However even after you complete all the steps users may not be able to enable offline capabilities of mobile CRM app. The main reason for that issue is, users may not have their offline profile configured in their user record. To fix that issue, you have to set Mobile Offline Profile for respective users. Following image shows how setting up Mobile Offline Profile for user.

After setting offline profile users should refresh their D365 Mobile app. After refreshing they can use D365 offline capabilities.




Friday, July 31, 2020

D365 CE Tips: Determine Mobile or Web in D365 CE using JavaScript

If you work with both CE Web and Mobile using Unified Interface, you may need to distinguish mobile client and web client inside your custom JavaScript. For example if you use single web resource for both CE web and CE mobile you have to distinguish both platforms to change your logic according to the platform.

Following code snippets will help you to distinguish platform based on the scenario.

Using GlobalContext

var globalContext = Xrm.Utility.getGlobalContext();
var Client = globalContext.client.getClient();


Using ExecutionContext

var Client = executionContext.context.client.getClient();

Value of Client variable will be “Web” or “Mobile” based on the platform. Hope this tip will be help. Enjoy 😊