With Dynamics 365 Business Central extensions, you can create custom entities and you can expose a custom entity as a RESTful API.
To create a new API in Dynamics 365 Business Central, you need to define a new Page object with PageType = API. To do this, you can use the tpage snippet and then select Page of type API, as follows:
When creating API pages, remember the following:
- Fields must have a name in the REST-API-compliant format (only alphanumeric values, and no spaces or special characters (camelCase)).
- You should use the ID of the entity (SystemId).
- When you insert modify, or delete an entity through APIs, triggers on the underlying table are not executed. You need to call the table's trigger by handling the corresponding triggers at the page level.
- In the OnModify trigger of the API page, you need to handle...