Using Enhanced Delegation for CDS in Canvas App

By | March 16, 2021

Introduction

Canvas App is used to perform all kinds of functionalities on the mobile app. In some apps we need to perform various operations. For example, we can search a particular word using a specific letter and finding the count of records as a result. To achieve this, we use functions in the Canvas App.

What if there are high numbers of records? Suppose 25000 and we need to find contacts that match some specific letters like ‘Ta’. Previously, we couldn’t do it since searching would be restricted to 500 records (or the number provided in settings) but now, using Delegation, we can search in all the existing records. Let’s see how this can be done.

First, enable Delegation. Please follow the below steps for this:
• First click on File in Canvas App.
• Go to Settings > Advanced Settings.
• Click Enhanced delegation for Common Data Service.

Once you have enabled Delegation you will be able to use the function and perform operations on all the records.

Below functions are used in the delegation.

1. In
2. CountRows
3. First
4. CountIf

Suppose if we want to count number of contacts that has a rating greater than 3 and display that count in the label field, we can achieve this by writing the below code of Text property on the label.

Using Enhanced Delegation for CDS in Canvas App

Conclusion

With the help of Enhanced Delegation we can use functions that perform operation on entire records.