CRM Crate

Understanding the delegation warning in Canvas App (With Examples)

We will learn and understand the delegation warning in Canvas App with practical examples. Before we start, make sure to subscribe to CRM Crate so that you stay up-to-date in field of Dynamics 365 CRM.

Understanding the delegation warning in Canvas App (With Examples)

What is delegation?

“Delegation” is where the expressiveness of Canvas Apps formulas suffice the need to minimize data moving over the network.

As a app customizer / developer, the delegation is a very important concept to understand, especially if you are working with large sets of data in PowerApps. For example, when performing data operations like searching and filtering for specific records the delegation offloads the work to the data source. In simple words, it means that the operations like Filter, Lookup, and Search are performed at the data source instead of bringing the complete set of data to the application and then processing it locally.

Possible reasons of getting delegation warning –

If the delegation warning appears while performing operations in your formulas, it means that your operations cannot be offloaded for one of several reasons:

Non-delegable limits in Canvas Apps-

The formulas which cannot get delegated will be processed locally. If these formula involve the retrieval of large chunk of data then all the data must be brought to the device first which can result in slowness of the application. To avoid this, Power Apps imposes a limit on the amount of data that can be processed locally: 500 records by default.

Changing delegation limit in Canvas Apps –

We can change the default number of rows which are retrieved from server – based connections where delegation is not supported with the below steps.

  • In the ribbon bar, click on Settings and navigate to the General tab.
  • Search for the area “Data row limit” as shown below. Here we can change the limit of row retrieval from 1 to 2000.
  • In some cases, you’ll know that 1000 row retrieval will satisfy the needs of your scenario. With care, you can increase this number to fit your scenario. As you increase this number, your app’s performance may degrade, especially for wide tables with lots of columns. Still, the best answer is to delegate as much as you can.

Understanding delegation warning with practical examples –

We will be understanding the delegation warning with the below given examples.

  • Consider the use-case scenario as given in the below diagram.
  • Below are the set of operations which will be perform using the Canvas App Power FX Formulas.
  1. Counting total number of “CRM Crate Account” related to the main “Subscriber” record.
  2. Summing the field “Payable Amount” present in the “CRM Crate Account” records which are related to the main “Subscriber” record.
  3. Display the complete list of “CRM Crate Account” records which are related to the main “Subscriber” record.
  • I have purposefully utilize the “In” operation in the filtering formula to display the delegation warning as shown below.
  1. Delegation warning occurred while counting the total number of “CRM Crate Account” related to the main “Subscriber” record.
  2. Delegation warning occurred while summing the field “Payable Amount” present in the “CRM Crate Account” records which are related to the main “Subscriber” record.
  3. Delegation warning occurred while summing the displaying the complete list of “CRM Crate Account” records which are related to the main “Subscriber” record.
  • Considering the demo data, there are total six “CRM Crate Account” records in the dataverse as shown below.
  • Currently, the application’s row retrieval limit is 1000, therefore all the six “CRM Crate Account” records will get retrieved by the above given formulas (1000 > 6).
  • Now for demonstration purpose, let us reduce the row retrieval limit to 2 from 1000. Now since the row retrieval limit (2) is less than the total rows present in the collection (6) (Dataverse Entity), only two rows will get retrieved by the above given formulas.

Thus, we learned and understood the delegation warning in the Canvas App with practical examples.

4.8 4 votes
Article Rating
Subscribe
Notify of
4 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Best tips & tricks to improve performance of canvas apps - CRM Crate
2 years ago

[…] Click on the given link to learn more about delegation in Canvas App – https://www.crmcrate.com/power-apps/understanding-the-delegation-warning-in-canvas-app-with-examples… […]

Enhanced Delegation for Microsoft Dataverse in Power Apps - CRM Crate
2 years ago

[…] Click here to learn more about Delegation in Power Apps […]

Best strategies for enhancing Canvas App performance
9 months ago

[…] Learn more about Delegation […]

бнанс акаунт
29 days ago

Your article helped me a lot, is there any more related content? Thanks!

error: CRM Crate Security Engine - Disabled Right Click & Selection!

Congratulations!

Well Done,
Welcome to CRM Crate

Stay tuned with us and get all latest updates and learning in Microsoft CRM and related techonologes.