Skip to content

Commit 743996e

Browse files
Live publish for 04 June 2024.
2 parents e825fb7 + d348d10 commit 743996e

21 files changed

+474
-303
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9119,6 +9119,11 @@
91199119
"source_path": "powerapps-docs/user/[email protected]",
91209120
"redirect_url": "collaboration",
91219121
"redirect_document_id": "false"
9122+
},
9123+
{
9124+
"source_path": "powerapps-docs/mobile/offline-capabilities.md",
9125+
"redirect_url": "mobile-offline-overview",
9126+
"redirect_document_id": "false"
91229127
}
91239128
]
91249129
}

powerapps-docs/maker/TOC.yml

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1807,40 +1807,48 @@
18071807
href: ../mobile/optimize-for-devices-overview.md
18081808
- name: Optimize for devices controls (preview)
18091809
href: ../mobile/optimize-for-devices-controls.md
1810-
- name: Mobile offline for model-driven apps
1810+
- name: Configure mobile apps for offline use
18111811
items:
1812-
- name: Mobile offline overview
1813-
href: ../mobile/mobile-offline-overview.md
1814-
- name: Set up guide
1812+
- name: Mobile offline for canvas apps
18151813
items:
1816-
- name: Set up mobile offline
1814+
- name: Mobile offline for canvas apps overview
1815+
href: ../mobile/canvas-mobile-offline-overview.md
1816+
- name: Set up mobile offline for canvas apps
1817+
href: ../mobile/canvas-mobile-offline-setup.md
1818+
- name: Configure files and images in offline canvas apps
1819+
href: ../mobile/files-images-offline-canvas-apps.md
1820+
- name: Work with canvas apps offline
1821+
href: ../mobile/canvas-mobile-offline-working.md
1822+
- name: Sync data offline in the background
1823+
href: ../mobile/sync-data-offline-background.md
1824+
- name: Mobile offline limitations for canvas apps
1825+
href: ../mobile/limitations-canvas-apps.md
1826+
- name: Mobile offline for model-driven apps
1827+
items:
1828+
- name: Mobile offline for model-driven apps overview
1829+
href: ../mobile/mobile-offline-overview.md
1830+
- name: Set up mobile offline for model-driven apps
18171831
href: ../mobile/setup-mobile-offline.md
1818-
- name: Configure mobile offline profiles for images and files
1832+
- name: Configure files and images in offline model-driven apps
18191833
href: ../mobile/offline-file-images.md
1820-
- name: Offline profile guidelines
1821-
href: ../mobile/mobile-offline-guidelines.md
1822-
- name: Mobile offline capabilities and limitations
1823-
href: ../mobile/offline-capabilities.md
1824-
- name: User guide
1825-
items:
1826-
- name: Work offline on your mobile device (offline-first mode)
1834+
- name: Work with model-driven apps offline (offline-first mode)
18271835
href: ../mobile/work-in-offline-mode.md
1828-
- name: Work offline on your mobile device (classic mode)
1836+
- name: Work with model-driven apps offline (classic mode)
18291837
href: ../mobile/work-offline-mode-classic.md
18301838
- name: View offline sync status
18311839
href: ../mobile/offline-sync-icon.md
1832-
- name: Sync data in the background
1840+
- name: Sync data offline in the background
18331841
href: ../mobile/sync-data-offline-background.md
1834-
- name: Mobile offline for canvas apps
1835-
items:
1836-
- name: Mobile offline for canvas apps overview
1837-
href: ../mobile/canvas-mobile-offline-overview.md
1838-
- name: Set up mobile offline for canvas apps
1839-
href: ../mobile/canvas-mobile-offline-setup.md
1840-
- name: Configure files and images in offline canvas apps
1841-
href: ../mobile/files-images-offline-canvas-apps.md
1842-
- name: Work with canvas apps offline
1843-
href: ../mobile/canvas-mobile-offline-working.md
1842+
- name: Mobile offline limitations for model-driven apps
1843+
href: ../mobile/offline-limitations.md
1844+
- name: Optimize how offline works on mobile devices
1845+
items:
1846+
- name: Best practices for developing an app for offline use
1847+
href: ../mobile/best-practices-offline.md
1848+
- name: Optimize the offline profile
1849+
href: ../mobile/mobile-offline-guidelines.md
1850+
- name: Resolve sync conflicts with the server
1851+
href: ../mobile/resolve-sync-conflicts.md
18441852
- name: Set an app as a startup app
18451853
href: ../mobile/set-startup-app-mobile.md
18461854
- name: Troubleshoot issues in the mobile app

powerapps-docs/maker/data-platform/map-entity-fields.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ When you map table columns for a 1:N table relationship certain items of data fr
5353
>
5454
> These mappings aren't applied for new related table forms that are opened when an app does not have an active network connection to Dataverse, except for parent lookup fields.
5555
>
56-
> Field mapping between tables isn’t supported when you’re using an app in offline mode. For more information, see the limitations listed in [Mobile offline capabilities and limitations](../../mobile/offline-capabilities.md#limitations).
56+
> Field mapping between tables isn’t supported when you’re using an app in offline mode. For more information, see the limitations listed in [Mobile offline limitations for model-driven apps](../../mobile/offline-limitations.md).
5757
5858
## Open solution explorer
5959

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
---
2+
title: Best practices for developing an app for offline use
3+
description: Learn about the best practices for developing an app for offline use.
4+
author: trdehove
5+
ms.component: pa-user
6+
ms.topic: quickstart
7+
ms.date: 05/31/2024
8+
ms.subservice: mobile
9+
ms.author: trdehove
10+
ms.custom: ""
11+
ms.reviewer: sericks
12+
ms.assetid:
13+
search.audienceType:
14+
- enduser
15+
searchScope:
16+
- "Power Apps"
17+
---
18+
19+
# Best practices for developing an app for offline use
20+
This article provides recommendations for how to create the best experience for users of apps configured for offline use.
21+
22+
- If you configure a canvas app for offline use, you need to optimize how the app fetches data from the data source. Learn more: [How to create the best offline user experience in canvas apps](best-practices-offline.md#how-to-create-the-best-offline-user-experience-in-canvas-apps)
23+
- To function offline, an app must initially download all necessary assets, including resources and data, to operate independently of a network connection. This process is a one-time, setup task that occurs during the app’s first use. The speed of this initial download is influenced by the volume of data downloaded to the device, which is determined by the offline profile settings and the quantity of data available to the user within the app’s environment. For a seamless, initial experience, it’s advisable to plan the your [offline app rollout](best-practices-offline.md#plan-your-offline-app-rollout).
24+
25+
## How to create the best offline user experience in canvas apps
26+
27+
Use the following recommendations to create a fast user experience for specific scenarios.
28+
29+
|Scenario | Approach that's not recommended | Recommended approach |
30+
|-------------------------------|----------------------------|--------------------------------|
31+
| Show related tables information in a gallery. | Use a look-up to fetch the data. | Use a view containing the columns of the related table.|
32+
| Create a filterable gallery with a lot of records. | Load the records from Dataverse and store them in a collection. Set the items of the gallery to the filtered collection. | Directly set the items of the gallery to the Dataverse-filtered data. |
33+
| Update multiple records. | Loop the records and patch them individually. | Bulk patch a collection containing all the modifications. |
34+
35+
### Diagnose mobile offline canvas apps with Monitor
36+
37+
Monitor is a tool that offers makers a deep view of what an app does and how it does it by logging all key activities that occur in the app as it runs. You can [connect a mobile app session to Monitor](/power-apps/maker/monitor-canvasapps) to better diagnose and troubleshoot issues faster.
38+
39+
## Plan your offline app rollout
40+
41+
> [!IMPORTANT]
42+
>If you're using an **auto-generated offline profile** (available for canvas apps only), and if the first synchronization is taking too much time, you should create a manual, offline profile by using the following best practices.
43+
44+
Develop and roll-out your offline app in three phases.
45+
46+
:::image type="content" source="media/mobile-offline-guidelines/phases.png" alt-text="Illustration that shows Phase 1 for a maker, Phase 2 for testers, and Phase 3 for users.":::
47+
48+
### Phase 1: Develop and iterate
49+
50+
After you've [set up mobile offline for canvas apps](canvas-mobile-offline-setup.md#create-a-custom-mobile-offline-profile-with-admin-rights) or [set up mobile offline for model-driven apps](setup-mobile-offline.md#set-up-a-mobile-offline-profile), it's time to start testing and tweaking. Use [Power Apps mobile](run-powerapps-on-mobile.md) or [Field Service Mobile](/dynamics365/field-service/field-service-mobile-app-user-guide) to determine how the app behaves when it's offline. For Windows, you'll find the [Power Apps for Windows](windows-app-install.md) app in the Microsoft Store that allows iterating without the need for a mobile device.
51+
52+
In this phase, you'll add tables and apply filters to existing tables to make sure that the right data is downloaded to the app, following the guidelines to [Optimize the offline profile](mobile-offline-guidelines.md)
53+
54+
#### Outcome
55+
You confirm that all the tables and forms work offline after the data is downloaded and that download sizes are reasonable.
56+
57+
> [!IMPORTANT]
58+
> The metadata for the model-driven app is retrieved when the app starts. This means that if you change a component in your app, such as a form component or view, then you need to restart the app for the profile to reflect the changes.
59+
60+
### Phase 2: Test with users
61+
62+
Ask a few users to test the app with real data. Make sure the offline profile scales for different types of users and works on devices with varying storage capacities. Check the **Device status** page (available out-of-the-box in model-driven apps) for each user. For more information, see [Using the Offline template and offline status icon](canvas-mobile-offline-setup.md#using-the-offline-template-and-offline-status-icon). Adjust the filters in the offline profile to increase or decrease the amount of data that's downloaded.
63+
64+
:::image type="content" source="media/mobile-offline-guidelines/offline-status.png" alt-text="Screenshot of a mobile app's Offline Status page after a successful download.":::
65+
66+
#### Outcome
67+
You confirm that the offline profile scales to real-use cases. If not, [optimize the offline profile](mobile-offline-guidelines.md).
68+
69+
### Phase 3: Roll it out
70+
71+
Deploy the app to the rest of your organization.
72+
73+
#### Outcome
74+
You confirm that each class of user in the rollout is able to sync successfully and work offline.
75+
76+
## Don't miss the data your users need
77+
78+
Test whether your users have all the data they need. Compare the data available when the app is online and when it's offline. With the device in airplane mode, make sure the views and forms show the same data as in a web browser online. If there are differences, either adjust the filters in your views or adjust the filters in your offline profile.
79+
80+
### Add related tables if your app needs them
81+
82+
- **Business process flows:** If a form contains a business process flow, be sure to add the business process flow table. For more information, see [Supported capabilities](/dynamics365/mobile-app/mobile-offline-capabilities#supported-capabilities).
83+
84+
- **Files and images:** If your offline profile contains files and images, add tables for them. For more information, see [Configure files and images in offline model-driven apps](offline-file-images.md) or [Configure files and images in offline canvas apps](files-images-offline-canvas-apps.md). Use custom filters to limit download of critical files.
85+
86+
- **Timeline:** To make notes on the timeline control (for model-driven apps only) available offline, add the **Notes** table and the **Users** table to the offline profile. Notes can be large if users upload images and videos, so apply custom filters to the **Notes** table to limit download times.
87+
88+
> [!IMPORTANT]
89+
> Data downloads may be slower if users upload files larger than 4 MB to the timeline control. If users need to upload files larger than 4 MB, use the quick notes control in Field Service or **Files**/**Images** instead of the timeline to improve performance.
90+
91+
## Tips on mobile offline synchronization
92+
93+
- 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 mobile apps during synchronization.
94+
95+
- The time for initial metadata download is determined by the number of total tables in offline-configured app modules. Make sure to configure only those tables and app modules for offline that are necessary to optimize the experience for end users.
96+
97+
- Ensure that any view that you want to work offline doesn’t reference tables that aren't configured for offline use. For example, assuming **Account** is in the offline profile, then an **Account** view that references the primary contact when **Contact** isn't in the profile, isn't available.
98+
99+
- Changes to a user’s security privileges are updated during the next synchronization cycle. Until that time, users can continue to access data according to their previous security privileges, but any changes they make are validated during the synchronization to the server. If they no longer have privileges to make changes for a row, they receive an error and the row won’t be created, updated, or deleted.
100+
101+
- Any changes to a user’s privilege to view a row won’t take effect on the mobile device until the next synchronization cycle.
102+
103+
- Mobile offline honors the security model for mobile apps and the hierarchical security model, except the [field-level security and field sharing](/power-platform/admin/field-level-security).
104+
105+
### See also
106+
107+
- [Optimize the offline profile](mobile-offline-guidelines.md)
108+
- [Configure canvas apps for offline](canvas-mobile-offline-overview.md)
109+
- [Configure model-driven apps for offline](mobile-offline-overview.md)
110+
- [Configure offline data for the Field Service (Dynamics 365) mobile app (contains video)](/dynamics365/field-service/mobile-power-app-system-offline)
111+
- [Five tips for implementing the Field Service (Dynamics 365) mobile app (blog)](https://cloudblogs.microsoft.com/dynamics365/it/2021/04/21/5-tips-for-implementing-the-field-service-dynamics-365-mobile-app/)
112+

0 commit comments

Comments
 (0)