Hello,
After examining Business Central's tables and file management I am trying to create a Power Automate flow to get the attachment (pdf/docx/xlsx/etc.) from a Business Central Purchase Order so that I can fill in a SharePoint "Create file" action that has a site address, folder path and file name field already satisfied in Power Automate.
The problem is that I am having difficulty obtaining the attachments on the Purchase Order, so I currently do not have possession of the file name and their body content to forward to my next planned SharePoint action (create file) at the moment.
Once I get the flow working successfully, the result would be a PDF appearing in SharePoint exactly as found from Business Central,
To better understand what Page and Table I am attempting to tap into, here are their values on Page Inspection:
Page: Document Attachment Details (1173, List)
Table: Document Attachment (1173)
For troubleshooting, I have exhausted the following actions and these values:
Get record (V3) action (Get Item Attachment Names)
Environment (satisfied with tested working values)
Company (satisfied with tested working values)
API category (satisfied with tested working values)
Table name: attachments (test failed with 404 NotFound error) | documentAttachments (test failed with 404 NotFound error)
Row ID: When a record is changed (V3) trigger 'body/Row ID' (dynamic content) (test failed with 404 NotFound error)
Get an image, file or document (V3) action (Get Item Attachment Data)
Environment (satisfied with tested working values)
Company (satisfied with tested working values)
API category (satisfied with tested working values)
Path: items/documentAttachments/attachmentContent (test failed with 404 NotFound error)
ID for 'items': the ID from the above Get Record (V3) action. (test failed with 404 NotFound error)
ID for 'documentAttachments': the Parent ID from the above Get Record (V3) action. (test failed with 404 NotFound error)
Each action above has been satisfied with values proven to be functionally working successfully on other Power Automate actions (for example, getting the Purchase Order's document number was able to actually create a new folder named after the document's number in a specified SharePoint subfolder of my desired site and alternatively skip the folder creation if the folder of the same name already exists in SharePoint inside the
SharePoint Condition - Does folder exist control).
This is where my currently flow stops abruptly: Bear in mind that I am testing this with a Purchase Order that I can confirm actually has a document attachment on it.
I cannot add a runafter value to accept a failed value as it is imperative to identify an attachment's name and body content to begin producing the file into SharePoint.
If you can find out which combination or amalgamation of actions to point to the correct table and path, your help is much well appreciated as it will benefit many with a similar problem like this.