FetchXml Query

dynamics_crm.fetchxml_query
ActionCRM & salesconnection required

Calls the Microsoft Dynamics 365 API with the connection's credentials.

Run a FetchXml query against an entity set and return the matching rows.

Connection

Required
Yes — the node will not save without one
Auth type
OAuth 2.0
Providers
Microsoft Dynamics 365
Secret shape
{"client_id": "…", "client_secret": "…", "refresh_token": "…"}
Config it needs
org_url, tenant, api_version
Resolved by
config.connection_id, else node.connection_id

Configuration

3 fields, 2 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
entity_set
The entity set to work with: 'accounts', 'contacts', 'opportunities', 'leads', 'incidents' (cases), 'tasks', or any other table's entity set name, including custom tables. It is the plural name from the table's 'Copy set name' in Power Apps, which is not always the plural of the table name.
stringYes——accounts
fetch_xml
The FetchXml document, starting with <fetch>. Its entity name must match the table behind 'entity_set'.
stringYes——<fetch top='5'><entity name='account'><attribute name='name' /></entity></fetch>
include_formatted_values
Also return the display text of choice, lookup and money columns alongside their raw values, as @OData.Community.Display.V1.FormattedValue annotations.
booleanNofalse——

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "entity_set": "accounts",
  "fetch_xml": "<fetch top='5'><entity name='account'><attribute name='name' /></entity></fetch>",
  "include_formatted_values": false
}

Output

One shape.

result

FieldTypeExample
items
The rows Dataverse returned, in order.
array—
returned
How many rows are in 'items'.
number—
count
Total matching rows, present only when 'count' was requested.
number—
next_link
The @odata.nextLink of the last page read, empty when there are no more rows. Pass it to dynamics_crm.odata_query to resume.
string—
{
  "count": 0,
  "items": [],
  "next_link": "",
  "returned": 0
}

Notes

  • FetchXml reaches what OData cannot: joins without a relationship, cross-table column comparisons and aggregates.
  • A FetchXml result omits null columns entirely rather than returning them as null.

See FetchXml Query run in a workflow.

In a technical demo we add the Microsoft Dynamics 365 connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.