<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=440810&amp;fmt=gif">

Microsoft Dynamics 365 OData Connections

By Michael Bock - December 20, 2018

We are happy to announce that we now support OData V4 for integration with Microsoft Dynamics 365 Business Central and Microsoft Dynamics 365 for Finance and Operations. Older versions of Microsoft Dynamics are also supported - for example Microsoft Dynamics NAV 2016 and 2017.

WHAT IS ODATA?

OData (Open Data Protocol) is an OASIS standard that defines the best practice for building and consuming RESTful APIs. OData helps you focus on your business logic while building RESTful APIs without having to worry about the approaches to define request and response headers, status codes, HTTP methods, URL conventions, media types, payload formats and query options etc. OData also guides you about tracking changes, defining functions/actions for reusable procedures and sending asynchronous/batch requests etc. Additionally, OData provides facility for extension to fulfil any custom needs of your RESTful APIs.

So this sounds really good and you could then expect that you can access different systems in the same way. On the technical level that is also true, but unfortunately (or fortunately for some) there is still room within the standard to implement the support in different ways and also to omit some of the support (like tracking of changes for example). Filtering can also be done in different ways.

In Rapidi we want to make it as easy as possible to use our different connectors. To do this we build in as much knowledge and functionality as possible into the connector, so that you don't need to worry about specific details like how to specify the company to use for a specific ERP system. This often results in specific connectors for each ERP or CRM system. This is also the case with OData, where we have specific connectors for Microsoft Dynamics 365 Business Central (also covering Microsoft Dynamics NAV 2016/2017/2018) and for Microsoft Dynamics 365 for Finance and Operations (aka Microsoft Dynamics AX). 

WHY USE ODATA

Microsoft started to introduce OData support for API access to their ERP systems some years ago, but it's only in the last couple of years that the support has become widely available across the different ERP systems and also supporting both reading and writing data in general.

We have also seen that the Microsoft OData implementations are quite fast in reading data, which is really good as that has been a main concern when using the (SOAP) Web Services provided for both Microsoft Dynamics NAV and AX.

Furthermore the OData APIs that Microsoft provide also handles the business logic. This means that any validation or code that exist in the system, will also run when reading or writing data through the OData API. This was a main concern when using a direct access to the MS-SQL Database underneath the ERP system. 

In general using OData for integration with Microsoft Dynamics 365 systems works very well and this is also what Microsoft recommends. However, there are still some things that OData does not support such as reading changes only using the NAV timestamps (which you can only do directly from MS-SQL). Furthermore some create operations like creating Sales Orders in NAV work better with the NAV (SOAP) Web Services.

Rapidi will be using OData to integrate with the latest versions like Microsoft Dynamics 365 Business Central and Microsoft Dynamics 365 for Finance and Operations, but we will also continue to use the SOAP Web Services for some specific operations. For older versions of Microsoft Dynamics NAV and Microsoft Dynamics AX and for on-premise systems we can also use OData, but we will also continue to use SOAP Web Services and our direct MS-SQL connector (to read data) as these are well-tested standard integrations.

Microsoft Dynamics 365 Business Central (NAV)

Our Microsoft Dynamics 365 NAV OData connector supports the following versions:

  • Microsoft Dynamics 365 Business Central (all deployments: On-premise, Azure hosted and Microsoft Dynamics 365 hosted)
  • Microsoft Dynamics NAV 2017
  • Microsoft Dynamics NAV 2016

We support both reading and writing (create, update and delete). You can filter on specific data in the usual way in Rapidi but the syntax for the filters is specific to what the Microsoft ODataV4 for NAV supports.
For example you can use operators like eq (equal), lt (less than), gt (greater than) etc. - see this microsoft doc page for more details.
If you specify just the value (like 'hello') in the Value field for e.g. Source Filter, then Rapidi will compose a filter using the 'eq' (equals) operator. If you have a more complex filter, you can specify both the field name(s), operator and values in the Value part. You should omit the "filter=" as Rapidi adds that automatically.

The OData Web Services in Microsoft Dynamics 365 Business Central are based on either Pages (read and write) or Queries (read-only). In order to use an OData Web Service, you first have to publish the Web Service in Microsoft Dynamics 365 Business Central (search for "Web Services", then follow the link and publish the needed Web Services). Then to use the ODataV4 Web Service in Rapidi, you need to do a "Read Design" on the corresponding Connection.

We already have some clients using Microsoft Dynamics 365 Business Central and we will soon release a new Microsoft Dynamics 365 Business Central standard integration. So, stay tuned for more information.

Learn more are how to set up an OData Connection to Microsoft Dynamics 365 Business Central

Upgrading to Microsoft Dynamics 365 Business Central

As Rapidi supports ALL older Microsoft Dynamics NAV versions (even back to the old text based NAV356), you can use Rapidi to transfer your data directly into Microsoft Dynamics 365 Business Central when upgrading from an older Microsoft Dynamics NAV version. This is a repeatable process and you can do it in one step from any older Microsoft Dynamics NAV version as soon as you have set up the transfers. 

Microsoft Dynamics 365 for Finance and Operations (AX)

Our Microsoft Dynamics 365 AX OData connector supports the following versions:

  • Microsoft Dynamics 365 for Finance and Operations (all deployments: On-premise, Azure hosted and Dynamics 365 Microsoft hosted)
  • for older versions, please contact us

We support both reading and writing (create, update and delete). You can filter on specific data in the usual way in Rapidi but the syntax for the filters is specific to what the Microsoft ODataV4 for AX supports (e.g. you can use operators like eq (equal), lt (less than), gt (greater than) etc. - see this doc page for more details.

OData entities in Microsoft Dynamics 365 for Finance and Operations are based on the concept of an updatable view. When the IsPublic property for an updatable view is set to True, that view is exposed as a top-level OData entity. A good number of OData endpoints are normally already exposed in Microsoft Dynamics 365 for Finance and Operations.

Rapidi will automatically add "cross-company=yes" to the url and also add a "dataAreaId eq xxx" filter (where xxx is the Company specified on the Connection). This ensures that we read from a specific company only. This behaviour can be overwritten by specifying e.g. the dataAreaId filter in the transfer.

Read more about OData in Microsoft Dynamics 365 for Finance and Operations 

Learn more are how to set up an OData Connection to Microsoft Dynamics 365 Finance and Operations.

Transfer only changed records with OData

The Microsoft OData API does currently not support tracking changes in the ERP data. So, in order to detect and transfer only the changes when reading using the OData interface, we use our Mirror Technology. Our Mirror Technology is available both for on-premise and hosted installations (Azure or Dynamics 365 hosted). The Mirror Technology is very easy to use. You (or we if the mirror is hosted by Rapidi) just need to create an empty database for the mirror and specify how to connect to it  and everything else runs automatically. 

Keeping track of the links (Key Cross-references)

To keep track of the relation between records in your ERP (Microsoft Dynamics 365) and your CRM system, we use our Link Storage Technology. This allows us to store a link between the primary key used in the ERP system (e.g. the Customer number) and the corresponding Account Id in the CRM system. This link can then be used for updating these records (customers/accounts) between the systems but also as a lookup table for other transfers (for example to get the customer number for a specific account id when creating a new SalesOrder in the ERP). Learn more about our Link Storage Technology in this blog post.

We hope you enjoyed reading this article. As always, if you have any questions or comments, please contact us.

Best Regards

Michael

And...

Merry Christmas and Happy New Year from the Development Team!

 

 


About the author

Michael Bock

Picture of
Michael founded Rapidi on technological excellence, fantastic customer service and continuous improvement. A data integration specialist since 1987, he remains focused on creating technology that solves real business problems.


SHARE