Closed clagoa closed 3 years ago
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.
Hi guys,
I have been creating a custom API to use as WebHook (Subscription) from an external application. I have created endpoints on several tables (products, customers, vendors, Item Ledger Entries) and everything works correctly except when I try to subscribe to the BOM Component endpoint.
1. Describe the bug Business Central response an error when create a subscription on a API Endpoint based on the "BOM Component" table.
2. To Reproduce
Define a page API like this:
Publish and create a subscription throw the API with a POST request like this:
3. Expected behavior BC must return a 200 HTTP code and create the subscription
4. Actual behavior BC returns a 400 HTTP code error and the subscription is not created:
5. Versions:
AL Language:
Visual Studio Code: 1.54.3
Business Central:
List of extensions that you have installed:
The extension "ALProject21" only contains the BOM Component API page.