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

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Auto populate Current date and time field in form

(0) ShareShare
ReportReport
Posted on by 46

Auto populate Current date field in form ax2012

I want when open form then CreateDateTime field auto fill, how??

Any one help me please.

Thank You!

pastedimage1655881388884v1.png

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    238,651 Most Valuable Professional on at

    You're looking at the problem from a wrong angle. You want to to initialize the value when creating a new record in the table, not when opening a form. Yes, when you open a form and there is no record, a new one is created, therefore it looks like the same thing in the particular case, but focusing on the form is misleading.

    The problem in your case is that this field is populated when the record is inserted, which didn't happen yet. It'll be populated when you fill mandatory fields and save the record. That's how it works across the system, therefore the best thing you can do is explaining that to users and not making any changes.

  • Ahmad0751 Profile Picture
    46 on at

    okay you mean when user add record and then show in form otherwise it is not possible?

    Thank you!

  • Martin Dráb Profile Picture
    238,651 Most Valuable Professional on at

    You can't show the time when the record was inserted to database before it was actually inserted. That's clearly impossible - you don't know when exactly it'll be inserted - or if it'll be inserted at all.

    If you really want, you can create another field with a different meaning - not when the record was created, but when it was initialized and a user could start working on it. Then you could easily initialize the value in initValue() method of the table. But I doubt that this additional field would be useful enough; that's why I recommended stricking to CreatedDateTime.

  • Ahmad0751 Profile Picture
    46 on at

    Thank for help.

  • Martin Dráb Profile Picture
    238,651 Most Valuable Professional on at

    If it answered your question, please don't forget to verify the answer.

  • Ahmad0751 Profile Picture
    46 on at

    Sir issue resolved.

    Thanks.

  • Martin Dráb Profile Picture
    238,651 Most Valuable Professional on at

    You verify an answer by Did this answer your question? > Yes on the reply (or replies) answering the question.

    You can read more about it in Suggested and Verified Answers.

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... 721 Super User 2026 Season 1

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 280 Super User 2026 Season 1

#3
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 255

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans