Common actions
Connectors define the actions Power Automate uses, and each connector has its own set of actions. This unit is about the actions between Power Automate and Dataverse.
The Dataverse connector has many different actions:
- Add a new row
- Add a new row to selected environment
- Delete a row
- Delete a row from selected environment
- Download a file or an image
- Download a file or an image from selected environment
- Get a row by ID
- Get a row by ID from selected environment
- List rows
- List rows from selected environment
- Perform a background operation (currently in preview)
- Perform a bound action
- Perform a bound action in selected environment
- Perform a changeset request
- Perform an unbound action
- Perform an unbound action in selected environment
- Relate rows
- Relate rows in selected environment
- Search rows (currently in preview)
- Unrelate rows
- Unrelate rows in selected environment
- Update a row
- Update a row in selected environment
- Upload a file or an image
- Upload a file or an image to selected environment
Note
The Dataverse connector has many advantages over other connectors and should be your first choice with Power Automate.
Retrieve data
When using the Get a row by ID or List rows actions to retrieve data, you should make sure that you specify only the required column fields, since Dataverse rows include a plethora of metadata.
Most Dataverse triggers provide all fields, so you don’t need to explicitly retrieve the record immediately after the trigger runs. However, the following exceptions apply:
- The When a record is selected trigger doesn’t include many-to-one lookup fields, and a Get a row by ID action will be required.
- The Delete option only includes the ID of the row, but no other columns.
Note
When you reference data retrieved earlier in a flow, the data does not automatically update after the original step runs.
Get lists of data
The List rows action can help you filter data by using an OData query or a FetchXML query to retrieve data.
When using the List rows action, you should:
- Filter the data on the List rows action, not in a later step with Data Operation actions.
- Consider that the Fetch Xml Query filters can do more advanced criteria, including related entities.
- Use the Expand Query filter to include related rows in the result.
- Use the FetchXMl Builder tool in XrmToolBox to create your OData and FetchXML queries.
- Enable pagination if you want more than one page of data. The page size is determined by the connector, and Dataverse is 1024. You can enable pagination in the action's settings tab. The limit is 100,000 rows.
Note
The Expand Query filter can help reduce the complexity of your flows, reduce the number of API calls made, and speed up your flows.
Update data
When using the Update a row action, you should:
- Include only the columns that have changed. This approach avoids triggering other automation and audit logging.
- Use the null expression to clear values.
- Provide a GUID for the primary ID. If you're using an alternate key, the system performs an upsert operation using the other data columns you supply.
Call custom actions
Microsoft uses the term action for several different behaviors in processes, for a type of process, and for steps within processes and flows. Custom actions are processes that are similar to classic workflows in their capabilities in terms of what can be performed with steps; in other words, action processes can use conditions and can create and update rows.
Custom actions are reusable processes that can be initiated from code and Power Automate. Microsoft also includes several built-in actions such as:
- Set Word Template - Creates a Microsoft Word document from a Word template.
- Add To Queue - Adds a record to a queue.
Power Automate cloud flows can call custom actions by using the Dataverse connector. You should use Perform a bound action for action processes that are associated with a table and use Perform an unbound action for action processes that are set as Global.