Being a developer I have to explore how a new feature or a framework has been developed and how can this be extended when needed. While working on dual-write implementation I came across many technical difficulties as the framework was not mature enough at that time since the dual-write is only generally available in end of March 2020 and I have been working on dual-write since mid-year 2019.
I must say MS has done tremendous amount of work to make the integration with Microsoft Dynamics 365 Finance Operations apps and Common Data Services via Dual-write
Bunch of AOT objects have been added at D365 FO side - screen shot taken from 10.0.13 these can grow with future releases if needed.
Application class has also been modified for dual-write, below method gets called when the database transaction tries to get committed, between ttsbegin and ttscommit.
Dual-write triggers only at ttsLevel 1, to understand this concept I did a small test.
From the trace log I can see that before ttscommit it goes to Application::ttsNotifyPreCommit and from there is makes a call to DualWriteChangeProcessorBase and in my scenario it goes to DualWriteSyncOutbound class.
If you dig deeper in this class, this creates the complete JSON message and sync this to CE.
In my next post, I will show what tables, entities, classes are involved and how you can see what JSON message is going out from FO to CE. Stay tune.