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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Update TimeStamp : CreatedDate

(0) ShareShare
ReportReport
Posted on by 2,013

Hi all,

I just add Timestamp Created date and time in one of my table in AX 2012, which already being used for around 2 years. As I checked, after added, the new column already filled in by today's date. Is it normal ? How to update this, because it will be confusing as the existing record was clearly not created today.

I tried to update using job, but there is red wave in the column which result error. Can't we update this timestamp field?

Please help.

Thanks,

Anton

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Brandon Wiese Profile Picture
    17,788 on at

    Yes, this is expected behavior.  The CreatedDateTime field has a default value of

    (dateadd(millisecond, -datepart(millisecond,getutcdate()),getutcdate()))

    so when it is added to an existing table, it acquires the same default value that a new record would.

    You can overwrite the CreatedDateTime field, but you have to enable it first on the buffer object.

    msdn.microsoft.com/.../aa617541(v=ax.50).aspx

    xRecord.overwriteSystemfields Method

    "Gets and sets the property that indicates whether system fields may be overwritten."

  • Suggested answer
    Anton Tjiptadi Profile Picture
    2,013 on at

    Hi Brandon,

    Thanks, this make it clear to me. it works.

  • Suggested answer
    Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    XRecord.OverwriteSystemFields will not work in this case.

    you are talking about VlaidTimeStamp Tables, so you have to update your table with correction mode as below

    Table1.validTimeStateUpdateMode(ValidTimeStateUpdate::Correction);

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans