1
Here i am sharing a sample code from my project:
Power Automate Code :
var knowledgeSource = 'accounts';
var query = "accountname eq 'Contoso'";
var results = Dataverse.SearchQuery(knowledgeSource, query);
if (empty(results)) {
LogError('No accounts found with the name Contoso');
} else {
LogInfo('Found accounts with the name Contoso');
}
Liquid Template Code Example (Copilot Studio):
{% assign knowledgeSource = 'accounts' %}
{% assign query = "accountname eq 'Contoso'" %}
{% assign results = Dataverse.SearchQuery(knowledgeSource, query) %}
{% if results.empty? %}
{{ LogError('No accounts found with the name Contoso') }}
{% else %}
{{ LogInfo('Found accounts with the name Contoso') }}
{% endif %}
1
Verify that the Dataverse data source is correctly configured in the Copilot Studio. check that the connection string, authentication method, and any other required settings are properly set up.