Implementing a new API for a custom entity

In this example, we will be creating a new entity in Dynamics 365 Business Central to handle the details of Cars, and this entity will also be exposed as an API for external applications:

  1. To do this, we first create a new Car table, as follows:
table 50111 Car{    DataClassification = CustomerContent;    Caption = 'Car';    LookupPageId = "Car List";    DrillDownPageId = "Car List";    fields    {        field(1; ModelNo; Code[20])        {            Caption = 'Model No.';            DataClassification = CustomerContent;        }        field(2; Description; Text[100])        {            Caption = 'Description';            DataClassification = CustomerContent;        }        field(3; Brand; Code[20])        {            Caption = 'Brand';            DataClassification = CustomerContent;        }        field(4; Power; Integer)        { Caption = 'Power ...

Get Mastering Microsoft Dynamics 365 Business Central now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.