Loading...

Offline mode for Power Apps model-driven app tutorial

Offline mode for Power Apps model-driven app tutorial
Offline mode for Power Apps model-driven app tutorial Gauthier Bordat Mon, 10/24/2022 - 09:17
Body

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. 

Good practices

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

  1. Enable the offline mode

https://learn.microsoft.com/en-us/power-apps/mobile/setup-mobile-offline

https://learn.microsoft.com/en-us/dynamics365/field-service/mobile-power-app-system-offline

    1. 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.

In the old version of the site map in
    1. Enable users

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)

Offline mode for Power Apps model-driven app tutorial

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.

Offline mode for Power Apps model-driven app tutorial
    1. 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”.

Offline mode for Power Apps model-driven app tutorial
    1. 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.

Offline mode for Power Apps model-driven app tutorial

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.

Offline mode for Power Apps model-driven app tutorial

You can also custom filter on data to charge in offline mode

Offline mode for Power Apps model-driven app tutorial
  1.       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.

Offline mode for Power Apps model-driven app tutorial

You must choose “Related row only” and add the needed relationships on both.

Offline mode for Power Apps model-driven app tutorial

If you do not have add it correctly you should see this error message in the app for mobile

Offline mode for Power Apps model-driven app tutorial
  1. 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.

Offline mode for Power Apps model-driven app tutorialOffline mode for Power Apps model-driven app tutorial

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.

Offline mode for Power Apps model-driven app tutorial
  1. 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.

Offline mode for Power Apps model-driven app tutorial

 But be careful about the “Dynamics 365 app for laptop” app the offline mode seems to not be available on it.

Offline mode for Power Apps model-driven app tutorialOffline mode for Power Apps model-driven app tutorial

               For the “Power apps for laptop” is it the same display and the same way than the offline mode for mobile

Offline mode for Power Apps model-driven app tutorial
  1. Limitations

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. 

  1. Common mistakes

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.

Offline mode for Power Apps model-driven app tutorial

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.

Offline mode for Power Apps model-driven app tutorial

Offline mode for Power Apps model-driven app tutorial

Image
/sites/default/files/2022-10/offlinemodemodeldriven.png

Published on:

Learn more
Featured Articles | Dynamics Chronicles
Featured Articles | Dynamics Chronicles

Welcome to our blog, the content is entirely dedicated to Microsoft Dynamics 365, CRM, Power Platform, Common Data Service (CDS) but also Azure. Follow us !

Share post:

Related posts

Power Platform Fundamentals #4: Understanding Power Fx in Power Apps: Core Functions, Formula Patterns, and Real-Time Business Scenarios: Quick Read Series

1. Business Scenario In modern enterprise applications, business logic is deeply embedded across user interfaces and data processes. This incl...

1 day ago

Decode & Fix : Shared App host initialization has timed out in Microsoft Power Apps

 Issue :While working with apps in the Microsoft Power Platform, we encountered a critical issue where the application failed to load pro...

1 day ago

How to patch images from Power Apps to Dataverse

Patching images is a very common use case for Power Apps. Learn how to patch images from an app to Dataverse! The post How to patch images fro...

1 day ago

How to patch images from Power Apps to D365 F&SCM

Patching images is a very common use case for Power Apps. Learn how to patch images from an app to D365 Finance & Supply Chain Management...

1 day ago

Dynamics 365 CE: Known Issues Creating Word Templates

A classic feature worth revisiting, today’s focus is Word Templates in Dynamics 365 CE/CRM. This tool remains a powerful option available for ...

2 days ago

Power Apps Code App | Connecting to a Copilot Studio Agent

In this article, let’s explore how to use a Power Apps Code App to connect and chat with a Microsoft Copilot Studio agent — directly fro...

3 days ago

Power Apps Code App | Querying data Across Environments

In this article, let’s explore how to use a Power Apps Code App to fetch Dataverse data from a different Power Platform environment. Thi...

4 days ago

Power Apps Code App | Images blocked by Content Security Policy (CSP)

Recently I was working on a Power Apps Code App and rendering images using <img> tags with external URLs inside a grid. But the images...

7 days ago

Power Apps – Use Microsoft 365 Copilot in model-driven apps

We are announcing the ability to use Microsoft 365 Copilot in model-driven apps in Power Apps. This feature will reach general availability on...

8 days ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy