Background

With D365 finance and operations, you can integrate with the application using ODATA and RESTFul api. Logic Apps has out of the box connectors that integrates with D365. However, there are several constraints in using the connectors when it comes to devops. In all my recent implementations, I am using HTTP connector to send/receive data to/from D365. The connector is simple and easy to use.

Problem

In one of my interfaces, I have to integrate sales data from source system and create general journals in D365. As the source file is pretty small and volumes are huge, it makes perfect sense to use Logic Apps to create journals in D365. Now, when you manually create the journal, D365 assigns a temporary voucher number to the journal line.

Below is one example of a voucher series set for the journal.

However, if you create a journal line using Logic Apps and HTTP connector, the out of the box standard code in D365 will assign the actual voucher series set for the journal. Below is the request message

Below is the part of the response message.

As you can clearly see that, D365 execution is different when the journal and journal line is created via ODATA and RESTFul api. You could also use Data Management Framework (DMF) to create a recurring job which can then create journals. This recurring job could then be integrated with Logic Apps. D365 does assign a temporary voucher number if you use it this way. So clearly, this is a bug. I highlighted this to microsoft by creating a ticket via LCS. Microsoft investigated this (close to 4 months) and finally said the current functionality is working according to their design and, they are not planning to make any changes in the near future. I really can’t accept that, but what other choice do I have.

Voucher number continuity

As the voucher numbers are assigned as per the journal number sequence, this would result in a journal to have non-continuous number sequences for vouchers.

For some organizations, this is really not a issue. But if some organizations wants to have a regulation to have voucher number to be continuous, then this needs to be fixed.

Solution

My teammate Adam Cole started looking into this issue. He quickly figured out that, when a journal is created via ODATA, a reference for the number sequence is set to for e.g. TEST-* number sequence. However, if you create a journal manually in D365, the reference is set to TVN-*. So, this is why we can see the difference in voucher number assignment. He then, made changes to the code base and we could see that the temporary voucher number was hence assigned via ODATA calls as well. Although MS does a commendable job, sometimes I feel that the support people who look into issues are not that much of an expert.

Visits: 324

5 1 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x