In Microsoft Dynamics 365 Business Central (Power Automate Actions), how do I… Use the “Update an Image, File or Document V3” Action

Microsoft Dynamics 365 Business CentralThis 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 12th action which is available is the Update an image, file or document (V3) one which allows you to update (but not insert) an image, file or document in Business Central. To insert a new image, file or document, you will need to use the Create record V3 action to create the file first and the use this update action to upload the actual image, file or document.

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):

Choose an action dialog with Business Central in the search results

Find and select the Update an image, file or document V3 action:

List of Business Central actions with Update an image, file or document V3 highlighted

There are a few parameters for this action which need to be populated:

  1. Environment which is set to use the variable populated by the trigger.
  2. Company which is set to use the variable populated by the trigger.
  3. 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.
  4. Path of the table from which you want to read the record; in this example, I have an going to insert a PDF attachment against a vendor, so the path is vendors/documentAttachments/attachmentContent.
  5. pathParameters which needs to be populated with JSON for the keys and content to be updated. In this example, I am updating vendors and related document attachment; if the JSON is malformed or incorrect (such as wrong fields name or value) the step will fail.
Update an image, file or document V3 action populated with parameters

As with some of the other actions, when you’re following best practice of using the environment and company variables, rather than hard-coding, the parameters and JSON all need to be populated manually. I typically find it best to create the action first with hard-coded parameters so I can get things like the path and names of the elements for the JSON:

Update an image, file or document V3 action populated with hard-coded environment and company parameters

In Microsoft Dynamics 365 Business Central, how do I…

In Microsoft Dynamics 365 Business Central (Power Automate), how do I…

In Microsoft Dynamics 365 Business Central (Power Automate Actions), how do I…
In Microsoft Dynamics 365 Business Central (Power Automate Actions), how do I… Understand Business Central Power Automate Actions
In Microsoft Dynamics 365 Business Central (Power Automate Actions), how do I… Use the "Get record V3" Action
In Microsoft Dynamics 365 Business Central (Power Automate Actions), how do I… Use the "Get url V3" Action
In the "For a selected Record V3" Microsoft Dynamics 365 Business Central Trigger in Power Automate, the Record URL is Avalable Without Using "Get url V3" Action
In Microsoft Dynamics 365 Business Central (Power Automate Actions), how do I… Use the "Find records V3" Action
In Microsoft Dynamics 365 Business Central (Power Automate Actions), how do I… Use the "Find One record V3" Action
In Microsoft Dynamics 365 Business Central (Power Automate Actions), how do I… Use the "Update Record V3" Action
In Microsoft Dynamics 365 Business Central (Power Automate Actions), how do I… Use the "Create Record V3" Action
In Microsoft Dynamics 365 Business Central (Power Automate Actions), how do I… Use the "Delete Record V3" Action
In Microsoft Dynamics 365 Business Central (Power Automate Actions), how do I… Use the "List Companies V3" Action
In Microsoft Dynamics 365 Business Central (Power Automate Actions), how do I… Use the "Run Action V3" Action
In Microsoft Dynamics 365 Business Central (Power Automate Actions), how do I… Use the "Get Adaptive Card V3" Action
In Microsoft Dynamics 365 Business Central (Power Automate Actions), how do I… Use the "Get an Image, File or Document V3" Action
In Microsoft Dynamics 365 Business Central (Power Automate Actions), how do I… Use the "Update an Image, File or Document V3" Action

What should we write about next?

Leave a Reply

Your email address will not be published. Required fields are marked *