web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

same createdDateTime when creating records

(1) ShareShare
ReportReport
Posted on by 150
Hi,

How can I make sure that I insert two records in the same table, and these two records have exactly the same createdDateTime? even if i do it in the same transaction would that gurantee that those two records will always have the same exact createdDateTime?
I have the same question (0)
  • Anthony Blake Profile Picture
    3,070 Super User 2026 Season 1 on at
    I would use an additional field so that you have control over the contents. CreatedDate/Time can then continue to work as it is supposed to.
  • Martin Dráb Profile Picture
    238,795 Most Valuable Professional on at
    Please explain what business problem you're trying to address, so we can suggest a better solution. The solution you chose is impossible to implement. If records are inserted a second apart, the fact that you see one second difference in CreatedDateTime is the correct behavior and you can't change that.
  • Anthony Blake Profile Picture
    3,070 Super User 2026 Season 1 on at
    As you've found, the Created Date Time isn't a field you can guarantee will be the same across records, so why not just add a custom field. You can treat it however you would like
  • Martin Dráb Profile Picture
    238,795 Most Valuable Professional on at
    As far I know, change tracking utilizes SQL Server Change Tracking, not CreatedDateTime field. Am I mistaken?
     
    IsLinked and CreatedDateTime doesn't sounds like a reasonable link of the related orders to me. You should use a SalesId reference, or a separate link table (especially if there may be more than two related orders).
     
    If you use a field for the SalesId reference, you also don't need to create any "dummy" field.
  • Martin Dráb Profile Picture
    238,795 Most Valuable Professional on at
    Could you react to my first question, please? As far as I know, change tracking isn't based on CreatedDateTime, therefore you seem to be solving a wrong problem.
     
    The change tracking table will be updated when the transaction is committed. If you create both orders in the same transaction, they (and their change tracking entries) will became visible to the rest of the system at the same time (when the transaction gets committed).
     
    Do you have some tests that prove me wrong?
     
    CreatedDateTime isn't available in all tables and it doesn't have any information about updates, which change tracking takes into account.
     
    Regarding your example, you're saying that you created SO2 and SO3 at almost the same time, but then you're saying that you want to export different orders together: SO3 and SO4. To me, it sounds like a very different scenario than what we discussed so far. You talked about orders created in the same transaction at the same time, while SO3 and SO4 were created twenty seconds apart. The fact that you created SO4 before SO3 and SO2 sounds suspicious too.
     
    Which orders did you create in the same transaction?
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 521 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 438

#3
Adis Profile Picture

Adis 261 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans