This article is part of the In Microsoft Dynamics 365 Business Central (Power Automate Actions), how do I… series, a sub-series of the In Microsoft Dynamics 365 Business Central (Power Automate), how do I… series and of the wider In Microsoft Dynamics 365 Business Central, how do I… series which I am posting as I familiarise myself with Microsoft Dynamics 365 Business Central.
There are a number of actions available in Power Automate for Business Central which allow specific actions against the data of Business Central to be performed from within Power Automate.
The third action which is available is the Find records (V3) one which allows you to select and return multiple records; this can be useful for processing multiple customers or vendors and/or selecting multiple documents.
Within a flow, click the add action button; search for Business Central and select the Business Central icon (make sure you select the SaaS one, which is a dark colour instead of the on-premises one which is mainly white):
Find and select the Find records V3 action:
There are four initial parameters for this action which need to be populated:
- Environment which is set to use the variable populated by the trigger.
- Company which is set to use the variable populated by the trigger.
- API category will default to
v2.0
which is the main API available, but there are others to select from, such as a workflow one, which have different tables available. - Table name of the table from which you want to read the record; in this example, I have used purchaseInvoices.
If you click the Show advanced options toggle at the bottom, four additional parameters will be displayed; with the parameters entered so far, every single record from the selected table will be returned and this is, almost certainly, not what you’ll be wanting.
The additional four parameters allow you to add filters, ordering and limit the number of returned rows:
- Filter Query – which is entered using OData syntax. In this example, I am selecting purchase invoices for the vendor record retrieved using the Get record V3 action and where the invoice date is earlier than 30 days ago (which I added as an expression using the addDays function.
- Order By – allows you to add an order to the returned data.
- Top Count – returns the top x number of records.
- Skip Count – allows you to skip x number of records in the return; this can be useful for things like pagination where you want to return the second set of 20 records.
In Microsoft Dynamics 365 Business Central, how do I…
In Microsoft Dynamics 365 Business Central (Power Automate), how do I…
What should we write about next?
If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.