Offline mode for Power Apps model-driven app tutorial
How to use the Offline mode model-driven app, and what are the limitations?
Some users of model-driven would like to access the app even without an internet connection. And Microsoft offers some functionalities of the model-driven app offline mode.
The offline mode for the model-driven app is still in preview for two years. So it is not perfect yet.
Before all, it is essential to know good practices to design the offline mode of your model-driven app the most efficiently possible. It is good to remind it is not built to be the primary use case of a model-driven app and is only a feature that can help in occasional situations. With short times of internet connections with low bandwidth, a big model-driven app will get problems with the offline mode.
First recommendation: make the offline mode the lightest you can make. Try to download the least amount of data. Make the functionality simple without unnecessary BPF or business rules. To do so, when you create the application, even for online users, think about the offline.
There is just one profile of users by model-driven apps in offline mode, so create the model-driven app for his use. You can perfectly create a little application for every specific use. If there are two specific types of users create two model-driven app
Enable the offline mode
Enable the model-driven app in offline mode
First, you must make your model-driven app enable for the offline mode. You must add a profile to this mode (one profile only for each model-driven app in offline mode). In the 9.1 version of the power platform, in the edit mode of the model-driven app in setting -> General, there is a button to turn the offline mode on.
For the previous versions, you can turn on the offline mode in the model-driven app designer.
You must enable access to the offline mode to the user's security role. Go to Advanced setting -> Security ->Security role, select the Security role of the user in the Core Records section, and give the proper access to the profile. (One privilege on the Mobile Offline profile give all privilege)
If you do not want to give this privilege to all users of a security role, you can add these users directly to the offline profile.
This time go to the admin center -> Environments -> the environment of your model-driven app -> Setting -> User + permissions -> Mobile configuration. There are out-of-the-box profiles for mobile, or you can create a new profile; in the profile, you can add users with offline access.
Enable table for
Every table you want to use in offline mode must be enabled for this. To do so, you must go to the table -> Properties -> advanced options -> rows in this table and check the case “Can be taken offline”.
Customize the profile offline
If you want to see the data in offline mode, you must add them to the offline profile. To add a BPF to your application in offline mode you must add it too. You will be able to see it but not to past to another stage in offline mode.
You can choose the data display by using filters out-of-the-box.
You can choose to display related rows. You must select relationships that filter the data with a maximum of 10 relationships for every app table. It is just a filter. If you have more relationships, they will be operational, but you will download more or fewer records according to the filters you chose. It will not be just the related records.
You can also custom filter on data to charge in offline mode
5. Enable image field and file field in offline
If you have image field or a file filed in some table of your model-driven app you must enable the image and file in offline mode. To do so you must add “Image Descriptor” table and “Fileattachment” table to the offline profile.
You must choose “Related row only” and add the needed relationships on both.
If you do not have add it correctly you should see this error message in the app for mobile
On the mobile model-driven app
Download Power Apps or Dynamics 365 on the Apple app store or google play store and log in.
If the app is not in production, it is possible you do not see your app in Dynamics 365 you must change the view to see it.
When you launch the app to activate the offline mode, go to the connection menu. You can update data with bouton 1 and activate the offline mode with bouton 2. Under that, you have an overview of the data displayed in offline mode.
The offline mode for laptop app
For the laptop app you can download two different app “Power Apps for laptop” and “Dynamics 365 app for laptop”. Log in classically and download the data for the offline.
But be careful about the “Dynamics 365 app for laptop” app the offline mode seems to not be available on it.
For the “Power apps for laptop” is it the same display and the same way than the offline mode for mobile
There are no limitations (As we know) on the number of tables, records, and BPF, but the more you add data offline, the heavier the model-driven app will be.
You will not be able to move from one stage to another in offline mode.
You can add business rules and JS script to the model-driven app; they will be available offline. It does not seem to get limitations on the size and the number of them. But it will make the model-driven app heavier.
If you have this kind of screen in a record, view, or subgrid, it is you do not add the table. You can see the lookup or quick view to a record of a table not added to the profile, but you cannot go to the record.
If You have this kind of screen when you try to open a record offline it is because the images field of file filed are not enable. Refer to 1.5.