Provide an enhanced offline experience for mobile users using Dynamics 365. Once offline synchronisation is turned on, mobile users can seamlessly work in offline mode on their mobile device when they don't have an internet connection.
This offline experience uses Azure services to periodically synchronize entities with the Dynamics 365 for phones and tablets apps so synchronized records are available when users’ mobile devices are disconnected. To enable mobile offline synchronization, follow the steps below.
- Mobile offline synchronization isn’t available for Trial, Preview or sandbox Dynamics 365 organizations.
- We’re working to improve mobile offline capabilities in Dynamics 365 for phones and tablets for release in the second quarter of 2019, and are currently onboarding only a limited set of new customers. When a preview program opens for mobile offline capabilities in Dynamics 365 for phones and tablets, we’ll let customers know. Existing customers who are already using mobile offline capabilities are not affected.
Step 1: Enable entities for mobile offline synchronization
One of the first things that you need to do is enable entities that will be available to mobile users when they're using the mobile app in offline mode. Any entity that is enable for mobile can also be enabled for mobile offline. To find a list of entities that are available for mobile see, Entities displayed in Dynamics 365 for phones and tablets.
The following entities are enabled for mobile offline by default:
SLA KPI Instance
- You can disable any of these above entities for offline or enable any entity from supported list for offline. Follow the steps below to enable or disable an entity.
To enable more entities for offline, follow the steps below.
Keep in mind that the amount of data you make available to users while they’re offline can affect the data usage rates for devices on cellular networks. The amount of data depends on:
- The number of entities you enable for mobile offline
- The number of days you specify since records were last modified
- The filters you set while creating mobile offline profiles
In the Dynamics 365 - custom app, go to Settings > Customizations.
Click Customize the System.
Expand Entities in the left pane.
Select the entity you want to enable for mobile offline (for example, Account).
Under Outlook & Mobile, select Enable for mobile offline.
Click Organization data download filter to filter the data and set the freshness of the data you want to make available offline. You can set up to three criteria when you define a filter. Select the field to filter by, select an operator, then set a value.
The entities that are enabled for mobile offline by default have Modified On set for Last X Days = 10, so the data modified or created in the last 10 days will be available for downloading to mobile devices.
When you’re done enabling entities for mobile offline, click Publish so your changes take effect.
Publishing customizations prompts the mobile apps to download changes when users next start their app, which can adversely affect their experience over slow connections.
Step 2: Enable mobile offline synchronization for your organization
In this step, you need to turn on mobile offline synchronization. The data for the entities that are enabled for mobile offline will be replicated in Azure service and will be available to sync with mobile clients
To enable offline synchronization, follow the steps below.
In the Dynamics 365 - custom app, go to Settings > Mobile Offline. If you don’t see this option, please contact tech support.
Click Mobile Offline Configuration.
Click Continue to accept the terms of the disclaimer and allow data to be shared with an external system on Azure services.
Select Start Provisioning. This starts the provisioning process for mobile offline. When it completes, your mobile users will experience the new mobile offline capabilities.
Users can continue working in offline mode while the application is syncing your data. To view the download status of all entities enabled for offline, see Entity Data Download Status.
4.1 Track Offline Status: Users can track the status of offline provisioning from stage 1 to 7. In the 5th stage, you can also track the data download status in terms of percentage complete and time remaining to complete data download
4.2 Start Working Offline Right Away: Once mobile offline synchronization is turned on, users can start using it without having to wait for all the entity data to download. Once mandatory entity data is complete, you can start using mobile app in offline mode while the system continue to download other entity data that you have selected. You will also be notified how long the download will take along with detailed status for each entity.
Recommendation for changing data centers or geo locations
If you decide to move your org to a different data center or geo location, you need to disable and then enable mobile offline synchronization for your org after the move is complete:
- Go to Settings > Mobile Offline.
- Click Mobile Offline Configuration.
- Select Start De-provisioning. This starts the de-provisioning process. If this option isn’t available, mobile offline synchronization was disabled during the move to a different data center or geo location, and you can continue to the next step. When the de-provisioning is complete, select Start Provisioning.
Things to know when you start mobile offline provisioning
Admins can see the status of provisioning and de-provisioning.
The mobile offline configuration page is auto-refreshed at regular intervals to show updated status messages during provisioning and de-provisioning.
You can stop provisioning at any stage during provisioning.
You can de-provision your organization when the provisioning is complete.
De-provisioning of an organization can't be stopped once initiated.
You can initiate provisioning again only when de-provisioning is complete.
In case of a provisioning or de-provisioning failure, consider retrying your provisioning before contacting support.
All the provisioning and de-provisioning messages will be shown on the Mobile Offline Configuration screen along with the date and timestamp of when the status was last checked.
Step 3: Create a mobile offline profile to determine what data will be available while offline
You need to create mobile offline profiles for users to configure filters that determine how much of an entity's data (and related entities' data) will be available to the user while offline.
- A user must have a security role that has Read permissions on the mobile offline profile to be able to use their mobile device in offline mode.
Go to Settings > Mobile Offline.
Click Mobile Offline Profiles.
Click New to create a new mobile offline profile. If you already have one that you want to edit, select it from the list.
Enter a name and description for your mobile offline profile.
Click Save to create the mobile offline profile so you can continue editing it.
In the Mobile Offline Profile Item Details area, click + to create a new mobile offline profile item. You need to create a mobile offline profile item for each entity you want to make available for this mobile offline profile.
Enter a name and select an entity. Only entities that you enabled for mobile offline appear in this list.
Admins can choose what information to sync to user's devices. This can help minimize impact to user's device's memory. Admins can define a custom filter based on the following rules. You can create filters up to three levels.
|gt – greater than|
|ge – greater than or equal to|
|le – less than or equal to|
|lt – less than|
Make sure that your users are using the latest version of the mobile app For Advanced Filters to work offline.
Select a data download filter based on the ownership type for the entity.
User or Team
- **Download related data only**. Make related data for this entity available offline. If you don’t set any relationships, no records for this entity will be available. - **All records**. Make all records for this entity available offline. - **Other data filter**. Make only the specified records for this entity available offline. If you select **Other records**, you can choose from the following: - **Download my records**. Make only your records available offline. - **Download my team’s records**. Make your team’s records available offline. - **Download my business unit’s records**. Make your business unit’s records available offline.
- **Download related data only**. Make related data for this entity available offline. If you don’t set any relationships, no records for this entity will be available. - **All records**. Make all records for this entity available offline.
- **Download related data only**. Make related data for this entity available offline. If you don’t set any relationships, no records for this entity will be available. - **All records**. Make all records for this entity available offline. - **Other records**. Make only the specified records for this entity available offline. If you select **Other records**, you can choose from the following: - **Download my business unit’s records**. Make your business unit’s records available offline.
- **Download related data only**. Make related data for this entity available offline. If you don’t set any relationships, no records for this entity will be available.
Click Save to create the mobile offline profile item so you can continue editing it.
In the Mobile Offline Profile Item Association Details area, click + to create a new mobile offline profile item association. You need to create a mobile offline profile item association for each related record you want to make available offline. In addition, you need to include any related entities in this mobile offline profile.
For example, if you create a mobile offline profile item association from the Lead entity, you need to add the Lead entity to this mobile offline profile.
Enter a name for the mobile offline profile item association, select a relationship, and then click Save.
When you’re done adding mobile offline profile item associations to the mobile offline profile item, click Save & Close at the top of the Mobile Offline Profile Item screen.
When you’re done adding mobile offline profile item details to the mobile offline profile item, click the Save button at the bottom right corner of the Mobile Offline Profile Item window.
Step 3.1: Add users to a mobile offline profile
Once you have created a mobile offline profile, you can start adding users to the profile.
You can add a user to only one mobile offline profile.
If it’s not already open, open the mobile offline profile you want to add users to.
In the Users area, click + to add a new user.
Click the lookup field that appears and select a user to add to this mobile offline profile.
When you’re done adding users, choose the Save button in the bottom right corner of the Mobile Offline Profile window.
Step 3.2: Publish a mobile offline profile
To make a mobile offline profile available to users so they can get the mobile offline experience you've defined for them, you need to publish the profile.
If it’s not already open, open the mobile offline profile you want to publish.
When you’re done adding users and making any other changes to the mobile offline profile, click Publish so the data you specified can start syncing with your users’ mobile devices.
Solution export and import
When exporting a solution that includes mobile offline profile, always select the Include entity metadata check box for each entity you export.
After importing the solution into the target organization, publish all mobile offline profiles.
Step 4: Enable the App Module for offline
Enable mobile offline for a specific app from MyApps page.
In the Dynamics 365- custom app, go to Settings > My Apps.
From the list of published apps, select an app you want to enable for mobile offline.
On the selected app, choose More Options (...).
Choose OPEN IN APP DESIGNER.
On the Properties tab, scroll down and select Enable Mobile Offline and then choose a profile.
- You can add more than one profile for an app module.
At the top choose Save and then Publish.
Here are a few things to keep in mind about mobile offline synchronization:
Mobile offline synchronization with mobile devices occurs periodically. A synchronization cycle could last for several minutes, depending on Azure network latency, the volume of data that’s set for synchronization, and mobile network speed. Users can still use the mobile apps during synchronization.
Changes to a user’s security privileges are updated during the next synchronization cycle. Until that time, users can still continue accessing data according to their previous security privileges, but any changes they make will be validated during the synchronization to the Dynamics 365 server. If they no longer have privileges to make changes for a record, they will receive an error and the record won’t be created, updated, or deleted.
Any changes to a user’s privilege to view a record won’t take effect on the mobile device until the next synchronization cycle.
Once you’ve enabled mobile offline synchronization, metadata changes are pushed to the mobile apps when the changes are published, not just on app start-up. To keep mobile offline synchronization up-to-date, users should always accept the prompt to download metadata changes.
When you enable Dynamics 365 mobile offline, Dynamics 365 (online) data is downloaded to the SQL Azure database using the Azure cloud, based on the entities you enable for offline availability. When a user connects to the Azure Cloud service from a mobile app with the offline capability, data is downloaded from the SQL Azure database to a local database on the mobile device. Data transfer between the SQL Azure database on the Azure cloud and the Dynamics 365 mobile app with the offline capability is through a secure SSL connection. Ultimately, customer data is stored in SQL Azure database and on the mobile device.
An administrator determines whether or not an organization’s users are permitted to go offline with Microsoft Dynamics 365 Mobile Offline Application by using security roles and Dynamics 365 Mobile profile customization. Dynamics 365 administrators can configure which entities are downloaded via Offline Sync by using the Sync Filters setting in the Setting –Mobile Offline dialog box.
Note that data stored in the user’s device is controlled by the customer, not Microsoft. The Administrator has full control over the data that can be extracted at the user security role or entity levels. After the data is extracted, however, it will have left the security boundary provided by Dynamics 365 Online.
A list of the Azure components and services that are involved with Mobile offline functionality is provided below.
Note: For more information about additional Azure service offerings, see the Microsoft Azure Trust Center.
Cloud Services (Web role)
Mobile Offline leverages two cloud services, one for provisioning and the other for data sync.
The provisioning service has a single web role that reads messages from the Service Bus (SB) queue for different events coming from Dynamics 365 such as provisioning or de-provisioning. Then it processes those messages by creating/deleting organization databases and submitting recurring work items (messages) on the data sync SB queue. During this process, it reads/writes configuration data either from the CSCFG file or from the Dynamics 365 SW API.
The data sync service has two web roles. One keeps the schema and data of the staging database in sync with a Dynamics 365 organization’s metadata and data, while the other web role is for running the Sync server and processing client’s sync requests. The first web role processes messages from the data sync SB Queue for different orgs and then contacts Dynamics 365 to get the metadata and data changes before committing them to the staging database. It also does the job on configuring Sync server with the organizations coming in and out of the system and their client models. The other web role runs the Sync server (unmanaged code) to host admin and sync endpoints. The admin endpoint is used by the other web role to send configuration data. The sync endpoint is used by external clients (Dynamics 365 Mobile Application) to do data sync. Just like provisioning service, both these roles read/write configuration data either from the CSCFG file or from the Dynamics 365 SW API.
Mobile Offline uses Azure Queues for message exchange between Dynamics 365 and Azure. It is used to maintain work items that are processed by the cloud services. Each message stores information such as the org id, entity name for which to sync data, and connection string for the org’s OData endpoint.
Mobile Offline uses the Azure SQL Storage to store:
- Data replicated from Dynamics 365 orgs and for serving client sync requests.
- Configuration data such as org database connection strings.
Mobile Offline uses Azure Blob Storage to store logs and traces generated by cloud service.
Active Directory Service
Mobile Offline uses the Azure Active Directory Service to authenticate with other services such as Dynamics 365 or SW API or Azure Management APIs.
Mobile Offline uses Azure DNS to redirect client requests, based on org names, to the correct cloud service endpoints.
Azure virtual Network
An Azure virtual Network (VNet) is a representation of your own network in the cloud. The Dynamics 365 Product Team can control your Azure network settings and define DHCP address blocks, DNS settings, security policies, and routing.
Azure Load Balancer
The Azure Load Balancer delivers high availability and network performance to your applications. It is a Layer-4 (TCP, UDP) type load balancer that distributes incoming traffic among healthy service instances in cloud services or virtual machines defined in a load balancer set. We use it to load balance our end points in a deployment.