web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

How to find the ParentId of Entity Record in dynamic 365 Business central

(0) ShareShare
ReportReport
Posted on by

I am trying to attach the file in Attachment of purchase invoice , general Journal record in dynamic 365 business central using SOAP API "https://{businesscentralPrefix}/api/v1.0/companies({id})/attachments" .
I need to pass ParentId & FileName to API to create the attachment.
please guide me where I can get the ParentId of records to create the attachment.

Thanks In Advance

I have the same question (0)
  • Suggested answer
    Andy Sather Profile Picture
    Microsoft Employee on at

    Hello  - We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

  • Verified answer
    Spencer A-C Profile Picture
    50 on at

    The ParentID will be the ID of the Invoice. If you have created the invoice in a previous step then you can utilise this ID. If not then you will need to call the Invoice API (Page 6404 of web services) and filter to the record you wish.

  • Community Member Profile Picture
    on at

    @Spencer A-C

    Thanks for your reply it's really helpful to me to solve my problem

  • Community Member Profile Picture
    on at

    also can you please guide to work with the API of "attachment" to attach the document to "Purchase Invoice"?

    "I have tried page 20039 web service to attach Documents in the Attachments tab of record .but instead of Attachment Tab it goes into Incoming Document"

    Thanks In Advance.

    SS for your reference

    pastedimage1604497632329v1.png

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,024 Super User 2026 Season 1

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,024 Super User 2026 Season 1

#3
YUN ZHU Profile Picture

YUN ZHU 1,383 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans