Hi Techies,
I have created a composite entity in D365 fno and have added an utcdatetime field as part of the primary key known as timestamp.
The primary key is "sales id " + "timestamp".
The timestamp will always be different however the sales id can get repeated multiple times.
We have created a recurring batch API to integrate records from 3rd party to D365 and vice versa.
Problem : When the users sends multiple records with difference in timestamp( in milliseconds) the flow gets into primary key voilation however there is no primary key violation as per the data. In fact the milliseconds are trimmed before getting into staging and hence it considers 2 different timestamp as same and hence gives an error.
eg. Timestamp1 = "18/08/2015 06:30:15.606" and timestamp2 = "18/08/2015 06:30:15.706"
Also note that I have just imported a single record and it got imported so there is no other issue apart from the milliseconds getting truncated which then violates the primary key.(sales id is the same for both records.
Timestamp1 value in the staging table after single record import is "18/08/2015 06:30:15.000"
As you can see that the difference is in milliseconds but then too the system gives an error and it does not even creates any record in the staging tables.
Can you please help me sort this issue ?
Why D365 trims the milliseconds while importing into the staging tables ? Is there a way I can fetch the correct data before it gets truncated in the staging tables.
Thanks,
Vikas Mehta.