Query Records
dynamics_crm.list_records
ActionCRM & salesconnection required
Calls the Microsoft Dynamics 365 API with the connection's credentials.
Query one entity set with the OData options Dataverse supports — $select, $filter, $orderby, $expand and $top — following pages up to a row limit.
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
10 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
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. | string | Yes | — | — | accounts |
select Comma-separated column names to return ($select). Always name the columns you need: without it Dataverse returns every column on the row. | string | No | — | — | name,revenue,createdon |
filter An OData $filter expression, for example statecode eq 0 and revenue gt 100000. | string | No | — | — | statecode eq 0 |
orderby An OData $orderby expression, for example 'createdon desc'. Include a unique column when paging, or a row can appear on two pages. | string | No | — | — | createdon desc |
expand Related rows to return inline ($expand), naming navigation properties, for example primarycontactid($select=fullname). | string | No | — | — | — |
top Return at most this many rows in a single page ($top). It is dropped when 'page_size' or 'max_results' asks for paging, because Dataverse ignores $top whenever a page size preference is present. | number | No | — | 1–5000 | — |
page_size Rows per page (Prefer: odata.maxpagesize). Dataverse ignores anything above 5000 and ignores $top entirely when this is set. | number | No | — | 1–5000 | — |
max_results Stop after this many rows, following @odata.nextLink across pages. Leave empty to return a single page. | number | No | — | ≥ 1 | 100 |
count Ask Dataverse for the total number of matching rows ($count=true) alongside the page. | boolean | No | false | — | — |
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. | boolean | No | false | — | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"count": false,
"entity_set": "accounts",
"filter": "statecode eq 0",
"include_formatted_values": false,
"max_results": 100,
"orderby": "createdon desc",
"select": "name,revenue,createdon"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
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
- Dataverse does not support $skip: page with 'page_size' and 'max_results', which follow @odata.nextLink.
- A query with no 'top' and no paging returns up to 5000 rows.
Related Microsoft Dynamics 365 nodes
See Query Records 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.