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 :
Microsoft Dynamics AX (Archived)

Proper use of CreatedDateTime in Data Entities

(0) ShareShare
ReportReport
Posted on by

Hello,

This questions refers to The New Dynamics AX (AX7) : how to use properly the CreatedDateTime field in a custom entity?

I created a new custom table, and set the Created Date Time property to YES.  

Then, I created a custom entity, for an OData integration with a C# client. In the data entity, I tried to add the field "CreatedDateTime", but this is not allowed. Adding a field "EntityCreatedDateTime" got me out of trouble (since this name is not system-reserved), and I was able to query the CreatedDateTime.

Unfortunately, when I try to create a new entity and post it to AX, I receive an error :

insert not allowed for field 'DataEntityCreatedDateTime'


How am I meant to use this field? I don't need to write anything in it, I would just like to be able to query the field.

Of course, I could create another UTCDateTime field, with a dummy name, but why not use the system field, since it is there?

Thank you for your guidance.

entity.png

6330.table.png

*This post is locked for comments

I have the same question (0)
  • dekaasboer Profile Picture
    1,530 on at

    The createdDateTime field is a system field. Every time a record is modified the AOS will update this field.  You should not try to insert data into this field through a entity. AX will fill the field for you when you import the data.

  • Raphael Tagliani Profile Picture
    on at

    Dear Rik,

    Thank you for your answer.

    I am aware of that : I am not trying to write in the field, but to use it in a select and be able to write the entity without touching CreatedDateTime.

    Do you have any solution for that?

  • Al Moulsdale Profile Picture
    on at

    Hi Raphael,

    Did you ever solve this?

    I am facing exactly the same problem, I want to be able to query against the original CreatedDateTime of a sales order.

    Thanks

  • Raphael Tagliani Profile Picture
    on at

    Hi Al M,

    Yes, I think so... if my memory does not fail me (I'm not 100% sure I remember correctly).

    In fact, it was not a limitation of the system but a database synchronization problem. I had to recompile and resynch the whole model. After that, it worked.

    Good luck with your development, let us know if that worked for you!

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Basit Profile Picture

Basit 1

#1
GL-01081504-0 Profile Picture

GL-01081504-0 1

#1
Roya Profile Picture

Roya 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans