We are about to develop an AL API app for BC365. This API app will contain webservices to read data from BC tables. Like master data like from table Item.
For us is right now not clear which technology fits best and what are the advantages and disadvantages.
Should we decide to go with:
- oData with exposed pages
- read extension fields dynamically (see below) https://community.dynamics.com/nav/b/navigateintosuccess/posts/using-complex-types-with-custom-apis
- read extension tables dynamically (see below)
- possible to use nextLink https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/query-data-web-api#limits-on-number-of-tables-returned
- possibilty to reduce the properties of types to the properties what we need. For example for table Item not all columns are needed and to reduce the amount of data being queried it would be good to to able to define for example which of the Item standard columns are needed.
- flexible to join other tables and return in the webservice
- fast webservice to read mass data
- compatibility to BC14 and BC17 (if possible). I mean in BC17 the structure of the database tables has be changed where extension fields are Because in BC17 extension fields are in separate tables.
Further explanation for: read extension fields dynamically
In the following you can see an OData from our application (it's the application which loads the data from BC). Our application can handle extension fields (we call it extension values) dynamically. That means during runtime of the application the application checks for each type if there are any extension fields by customization defined and exposes it in the metadata typesafe and also in the webservice to get the data.
Our application is sold to different of our customers where each customer can have its own customization and coming with that extension fields. The same is for the AL app which we want to develop. Our customers can have different extension fields for BC and I don't want to modify my AL app for each new extension field being added.
In our application extension fields are automatically being detected and added to each entity.
Every type in our application is in the webervice of type EntityType and has ExtensionValues property
User_ExtensionValues is ComplexType containing the extensionvalues.
Read extension tables dynamically
We need also have the possibility the read entirely new tables which are added as extension. No code in the AL app should be needed to be changed. The webservice caller knows what table and fields are required and the AL webservice should then dynamically build the query.
I am very interested on your answers. Thank you in advance