💾 Archived View for gemini.dazlab.uk › projects › learningCsharpforWork › 160522.gmi captured on 2022-06-03 at 22:57:34. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
For the last few weeks we've been planning the project, not just working through what needs to be done but really laying the groundwork by breaking each major step into micro steps:
We've recently migrated to a Dynamics 365 core financial system that we can program using AL language. If you're not familiar with Dynamics or AL, and unless you work in an enterprise environment you're unlikely to be, then from a technical perspective it's an ecosystem built around highly optimised SQL databases. The caveat is that all the SQL stuff is abstracted. You don't run SQL statements directly against the database, but instead use Application Language. AL is not a direct analogue of SQL. It's a complete programming language, very much like Object Pascal in terms of syntax and behaviour.
We've developed various customisations and tweaks and deployed them as extensions to the base application. In doing so we've become quite proficient in AL, as well as how Dynamics works under the hood, and in particular Business Central.
We're in the process of tendering for the development of an entire invoicing system extension, which will extend the core system. As a business we have unique requirements, and an off-the-shelf invoicing system just won't cut it. The invoicing is such a mammoth task that our team of two developers (myself and my manager) thought it better to tender the work out, leaving us to focus on writing the integration that will sync data between our other on-prem SQL systems and Dynamics. This will provide a usuable API for the developer of the invoicing system, and dramatically reduce the cost of 3rd-party development; the expensive part of the project is the sync integration, given it would be an entirely custom implementation, whereas there are entire companies who exist solely to sell D365 extensions. It's their bread-and-butter. Let them design it, and we'll just make sure they have the source data from all the required sources in the right format.
Won't say much here. I've published a custom "Sync" extension that publishes some API Queries, which in effect exposes some custom endpoints to give me a hook into D365. This will allow me to send API requests to D365 and POST SQL records into some staging tables. You create these tables through AL Query objects. You can also normalise the DB by using FlowFields and Lookups so that you're only storing data in one place.
it's all well-and-good having a nice shiny database, but at some point you have to start populating it with live data. This is the job of the Sync Service App. I've created a Visual Studio 2022 solution with the background service project, a shared code project for the business logic and a Desktop App project with a UI, giving me a usable interface for testing and debugging.