Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

How do I add an attachment to a Purchase Invoice Line via Power Automate / Flow?

(1) ShareShare
ReportReport
Posted on by 321
Hello -- hoping somebody can help with this flow.

I'm creating a Purchase Invoice with corresponding Purchase Invoice Lines, and I want to attach an image of a receipt to the Purchase Invoice Line. 

I can get the content into flow and BC, but I'm missing a step when it comes to adding the attachment.
 
My flow uses this step:
 
//
I can find the path for PurchaseInvoiceLines/item/documentAttachments/attachmentContent, and I'm passing the ID of the purchaseInvoiceLine and the content, but I have no idea what to use for the documentAttachments ID.
 
I tried creating a documentAttachment record, but purchaseInvoiceLine isn't one of the valid Parent Types, so I can't create a documentAttachment to get the ID.
 
Any ideas how this is intended to work? 

Any ideas / suggestions are appreciated.
 
Thanks!

Garrett
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 75,595 Super User 2024 Season 2 on at
    How do I add an attachment to a Purchase Invoice Line via Power Automate / Flow?
    Hi, unfortunately, as far as I know so far, the standard attachment API is Incoming Document (table 130), not Document Attachment (table 1173).
    More details:
     
    If you need to add attachments, you need to customize a new API. Here is a simple example for web service.
     
     
    Hope this helps.
    Thanks.
    ZHU
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,642 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans