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

Delete Assembly BOM records using API, web service, or AL code

(0) ShareShare
ReportReport
Posted on by 15

I would like to delete the Assembly BOM records for a given Parent_Item_No. I looked at using OData services with a DELETE request and receive a message "'DELETE' requests for 'AssemblyBOM' of EdmType 'Collection' are not allowed within Dynamics 365 Business Central OData web services.

So it appears the AssemblyBOM OData web service does not allow delete requests. Is there any way around this?

I also looked for an API for the Assembly BOM table but that does not seem to exist. Could someone please confirm this?

I have started looking at creating a custom API with AL code to perform the delete. I believe I have found a guide to create a custom codeunit API, however, I can't figure out the AL code required to actually delete the BOM records based on a Parent_Item_No parameter. Any guidance?

  • JAngle Profile Picture
    159 on at

    Even though it’s a few years old now it’s still a handy guide for using each command: community.dynamics.com/.../how-to-create-custom-apis-for-business-central-even-from-macos

    I usually ensure deletion by adding the property for that in the api page. When testing make sure you set the If-Match property for the http call. A wild card is fine in your case. The ondelete trigger of the page will need extra logic to find the extra records. If this is troublesome I would try this method instead: joshanglesea.wordpress.com/.../

    It’s more stand alone as the codeunit will take regular logic like check the item has a BOM if it does then delete all the lines

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

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 795 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 561 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 323 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans