Dynamically exposing extension fields to webservice and based on that the correct webservice decision

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

  • Soap

  • Codeunits

  • XMLPorts

  • oData with exposed pages

Our requirements:

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