Event Request in function CompareDateTime in CU TypeHelper
Hi,
I request an event OnBeforeCompareDateTime in typehelper. The function needs to exit on an return variable, so that need to be changed as well.

Before going forward with this request, I'd like to understand, why you would need to alter the behavior of the CompareDateTime function. Could you elaborate?
Hello Jesper,
The main reason i want this, is because when the CRM synchronization runs, it will check wether or not the record is changed in both business central and CRM, and it will give an error saying that it couldnt synch. the record.
After hours of debugging i found out that it took longer than 10 milliseconds to update the "Integration Record"."Modified On" or "CRM Integration Record"."Modified On" So basically it checks if the recordref (for instances Customers or Contacts) modified date against the integration record modified date. And if this is less than 10 milliseconds it is ok, but we had over thousand of cases in Dynamics NAV 2018 that was about 14-100 milliseconds different. I dont know if this is a problem due to slow servers, but i also tested the integration in BC, and i got the same problem there. Not often, but often enough.
(I testet this with a clean Business Central and CRM Online as well, just to be sure)
Therefore i thought this might be the solution. Either change so that it is ok to at least have 500 milliseconds difference or that we have the possibility to change it. The synchronization is totally out of control when this problem comes. Our customers have to do a lot of manual work even if they are not changing the record in both applications.
If you look into the function GetRowLastModifed and later on into IsModifiedAfterRecordLastSynch or IsModifiedAfterIntegrationTableRecordLastSynch. Its the same problem with Integratons Record as it is with CRM Integraton Record.

Hopes this made a somewhat sense :)
Thanks for this detailed explanation! That definitely makes sense and is something we need to address asap. But please allow me to discuss this with our integration team, before I add the event. This to me sounds more like an issue we should handle in the app, rather than having you work around it through an event.
We have a slice to address the false negatives when it comes to detecting whether a coupled record was modified in both systems. The current plan is to deliver this improvement for Business Central release in October this year. How urgent/painful is this issue? Can you wait until October release?
Our customer is going live in May, so we kind of need this before then if possible.
We want to avoid having events raised by the Type Helper codeunit. Would it work if we raise an event from the integration engine - from WasModifiedAfterLastSync method? Please come up with a suggestion for that kind of event.
What about two events in CRM Integration Record Table?

Yes, but shouldn't they be like this:
IsModifiedAfterLastSynchronizedCRMRecord(CRMID, DestinationTableID, CurrentModifiedOn, IsModified, Handled);
and IsModifiedAfterLastSynchronizedRecord(RecordID, CurrentModifiedOn, IsModified, Handled); because in this method you don't have CRMID and DestinationTableID.
Of course. i copy pasted, my bad.
This will be just fine.
I will add those to the next upcoming major (April) release.
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.