Hello,
I’m currently developing a connector that uses the Dynamics 365 Business Central API to share data between D365 BC and my company’s software. For the most part, everything’s gone swimmingly and was pretty straightforward to work with, but I have one major outstanding issue that I can’t quite figure out.
We use the API to create sales and purchase invoices in D365 BC. For both types of invoice, all of our lines are of type “account”; depending on various factors in our system, those lines should be associated with up to two different dimension values. In the UI, it’s trivially easy to go to the invoice lines and set the desired dimension values, but ideally, we’d be able to do this directly via the API at the time of invoice creation. I see nothing in the standard API that allows dimension values to be specified for invoice lines.
I have a feeling that this is possible via some kind of AL extension, but I’m not well versed in AL yet; I was able to expose the “Bill-to Customer No.” field for the “customers” API via a simple AL extension, but when playing around with an extension for the “Sales Invoice Line Entity” page, I see no way to expose the information I’d like, probably because it’s a more complex relationship involving the generating/locating of a dimension set.
I’d prefer to avoid working directly with dimension sets at all, if possible; rather, I’m hoping someone can point me in the right direction for simply being able to send/pull dimension value GUIDs along with my sales/purchase invoice lines (and then, hopefully, D365 BC will handle all of the dimension set shenanigans).
Thanks!