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 Apps Grid Container: A Better Way to Build Responsive Canvas Apps

Microsoft is always rolling out updates to improve the Dynamics and Power Apps experience. Recently, Microsoft introduced Grid Containers in P...

2 days ago

Building Standalone Apps with Power Apps Code Apps: Using Dataverse and Office 365 Users Connectors (Part 1)

In the Dynamics 365 and Power Apps ecosystem, we have several options for building applications, each one is for a specific type of requiremen...

13 days ago

Build AI-Powered Apps in Minutes with Power Apps Vibe: A Complete Guide

If you’ve ever tried building apps with Microsoft Power Apps, you know the process: creating tables, designing screens, adding controls, conne...

15 days ago

How to Vibe code yourself a Power App on vibe.powerapps.com

Recently Microsoft released a new way of developing apps within the Power Platform on vibe.powerapps.com. In this post, I will look at differe...

16 days ago

Power Apps Code App with Dataverse: Building CRUD Operations

In my previous blog post, I explained how to build a Code App using Power Platform Connectors. In that example, I used the Office 365 connecto...

17 days ago

Create MS Graph subscriptions in Power Apps without Power Automate

A while back I wrote a post about MS Graph subscriptions in Power Automate. Today I managed to do this directly within Power Apps.

17 days ago

Input and Output Parameters in Power Apps flows

Following on from yesterday's post about Input and Output Parameters in Power Automate, today I'm looking at the same for flows that are calle...

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