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

BC returns error when trying to create a subscription to an endpoint based on table "BOM Component"

(0) ShareShare
ReportReport
Posted on by 5

Hi guys,

I have created a custom API based on "BOM Component" table and when I try to create a webhook (subscription) within an external service I receive the following error:

pastedimage1616081334905v1.png

This is the definition of the Api page:
pastedimage1616081508225v2.png

I have other API Pages published in the same enviroment, based on other tables a everithing work ok, except this one.

Any ideas?

I have the same question (0)
  • Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    Not sure, but here you have DataAccessIntent = ReadOnly. Never tested if subscriptions work on the reas-only replica. Can you test without this?

  • Claudio Lagoa Profile Picture
    5 on at

    Thanks for your reply Stefano,

    I have performed the test that you have told me. I have removed the DataAccesIntent = ReadOnly property and it keeps returning the same error.

    On the other hand, I confirm that the subscription works with other models and with the DataAccesIntent = ReadOnly property.

    I have done the test on the Production version and a clean Sandbox in the latest version (17.5.22499.22680).

  • Suggested answer
    Claudio Lagoa Profile Picture
    5 on at
    Hi again, 

    I've been talking to Microsoft Support and It seems that you can't create API subscription with a composite primary key.
    In this case, It was using the primary key of the "BOM Component" table, which is: "Parent Item No.", "Line No.".
    
    The solution was simple, just add the SystemId field to the page and set it as OdataKeyFields.

    pastedimage1616584622005v1.png
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    True. Missed that in your code, sorry.

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,964 Super User 2026 Season 1

#2
Dhiren Nagar Profile Picture

Dhiren Nagar 1,086 Super User 2026 Season 1

#3
YUN ZHU Profile Picture

YUN ZHU 1,039 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans