JSON format to define application business objects
Business Objects are described as JSON files with well-known format, which defines the properties of each Business Object within the application. The format is called Business Object Definition
The Business Object Definition file is used by the compiler to generate Typescript declaration for your business object, which can be used directly in the application.
It is also used to automatically create or upgrade the database schema, where the business object instances will be stored.
Each application may have as many as needed Business Object Definition files.
Every definition file must be located in src/Business Objects folder of the application.
It also must have the following format of the file name:
[BusinessObjectName].bo.json
So if your business object is called Customer, it must be stored in a json file called: Customer.bo.json
If the business object is called Item, then it must be stored in a json file called: Item.bo.json
Take a look at the Business Object Definition file bellow. It is a JSON structure, which have one root property with the name of the Business Object ( line #3). Then it has a number of
{//name of the business object"Customer": {//the name of the business object//must be the same as the name of the business object"name":"Customer",//label of the business object displayed in UI widgets// must be a string or translation identifier"label":"Customer",//plural label for the business object displated in UI widgets"pluralLabel":"Customers",//maximum number of objects displayed at once in UI widgets//must be a number"pageSize":300,//if the UI widgets will automatically expose searching UI//cab be true or false"searching":true,//optional, defines the name of the business object when it//is transmitted over the wire during synchronization scenarios.//must be a string"syncTag":"Customer"//cotains list of business object members"properties": {//DMS_ROWID is required member and must be declared exaclty in this way"DMS_ROWID": {"type":"Binary","isIdentity":true,"isPK":true,"label":"Id","sorting":false,"searching":false,"uiType":"Default" },//custom business object member"no": {//required, data type of the business object//String, Int32, Int64, Decimal, DateTime, Boolean, Binary"type":"String",//optional, max size of the data assigned to the member//must be a number"length":30,//optional, label of the member displayed in UI widgets. Can be a string//or translation identifier"label":"Name",//optional, defines if the member is required on insert//can be true or false"required":true,//optional, defines if the member can be sorted in UI widgets//can be true or false"sorting":true,//optional, defines if the member can be searched in UI widgets//can be true or false"searching":true,//optional, defines the user interface type used from UI widgets to//render this member. Can be Default or textarea"uiType":"Default",//optional, defines the name of the attribute when the business object//is transmitted over the wire during synchronization scenario.//must be a string"syncTag":"No" },"age": {"type":"Int32","label":"Name","required":true,"sorting":true,"searching":true,"uiType":"Default", },//add more members here separated with comas } }}