Hello,
we are using D365 for Sales in combination with Business Central Online through native Dataverse/D365 for Sales Integration. In our AL-Extension, we are using the "CRM Contact" table (TableType = CRM) to read contacts from D365 in BC. When reading the "BirthDate"-field (Date), we sometimes experience a mismatch between the "real value", and the one we are getting in AL. In D365, the flied is of type DateTime. In BC, the field is of type Date. One example: In D365 UI, the birthdate is shown as 12.12.2003, the database/UTC value is 2003-12-12T20:37:03Z. However, in AL (BC) when reading the field we are getting 13.12.03.
My first guess was that it must have something to do with time zones. In BC, my user's time zone is (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna. In D365 the time zone of the integration user ("Business Central Integration Business Central to Common Data Service") was (GMT) Coordinated Universal Time. I changed the time zone in D365 to (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna. The change had no effect, AL still shows a different Date.
Does anyone have any ideas? Maybe the different datatypes (DateTime vs Date) is the problem?
Best regards,
Dima.