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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

Unlinked Attachment already exists error

(0) ShareShare
ReportReport
Posted on by 130

Hi,

I have start implementing business central API, I have successfully implemented '/salesInvoices' and '/salesInvoiceLines' data upload.

However, I have faced issue with attaching document to SalesInvoice in the endpoint '/attachments'.

Whatever document I upload, I am getting the error "The record in table Unlinked Attachment already exists.

 I used following request

https://api.businesscentral.dynamics.com/v2.0/<tenantID>/uat/api/v1.0/companies(companyID)/attachments

Body:

{    “parentId”: “5a086bc7-195f-eb11-89f9-0022481ab2d5”,    “fileName”: “Example.pdf”}

It was advised to retrieve the parent Id from the first successful attachment creation and use that parent Id in the PATCH request instead of creating a new one.

How to do that ? Which request I can use  to retrieve the parent Id from the first successful attachment creation ?

Thanks in advance

I have the same question (0)
  • DAnny3211 Profile Picture
    11,423 Super User 2026 Season 1 on at

    hi

    look this

    learn.microsoft.com/.../issue-with-the-api-endpoint-attachments

    DAniele

  • Dynamics Questions Profile Picture
    130 on at

    Hi DAnny3211 

    There is nothing, just message that shows to ask at the different forum 

    pastedimage1675080036068v1.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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 572 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 331 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 330 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans