How to use Autocomplete of Dataverse Search in Canvas App?

Recently, I was working on a requirement in the Canvas app regarding autocomplete. We wanted to display the auto-complete suggestion based on the account names as they were typed in. After fiddling around with the requirement, I stumbled upon the Dataverse Search. Microsoft recently came out with Dataverse Search API, which consists of various search features, and autocomplete is a part of it. Let’s dive in and see how to use that in a Canvas app.

So, for a basic setup, I’ve taken one text input and one label control. On change of the text input, I will call a Power Automate Flow, which will return the autocomplete response.

Power Automate Flow –

In the power automate flow, I’m calling the autocomplete API shown below –

The API of autocomplete goes like {crmURL}/api/search/v1.0/autocomplete and in the body of the request, we need to pass the search term, which I’m passing from the Canvas app and restrict the autocomplete to only account entity. After getting the response from the API, we need to parse the response, which is in JSON form, as shown below –

Canvas App

After parsing the response, I’m storing the value after removing the {crmhit} & {/crmhit} that is returned in the response. So, for that, we will use replace function provided in Power Automate Flow as shown below –

Canvas App

After storing the autocomplete response in a variable, I’m simply returning it to the Canvas app like below –

Canvas App

This is it for the Power Automate Flow; now we will see the Canvas app.

In the Canvas app, I’ve added a text input control. On change of the same, I’m calling the Power Automate Flow that we created before and storing the response passed from flow in a variable like below –

Canvas App

And in the Text property of label control, I’m showing the variable that we’ve stored.

Canvas App

So, after everything is set up, let’s see the autocomplete in action.


This is how we can use autocomplete feature in the Canvas app.

Let us help you with application building!

Want to visualize and build up a Model Driven App atop your steady, working framework?
We’ll help you to add components to your Apps, breezily. Contact us at and our Microsoft Dynamics 365 and Power Platform Inogic- Professional Services Division will help you at every step of the process!”

The post How to use Autocomplete of Dataverse Search in Canvas App? first appeared on Microsoft Dynamics 365 CRM Tips and Tricks.

Source link

Interesting Posts

Leave a Reply

Your email address will not be published. Required fields are marked *