Skip to main content

Notifications

Announcements

No record found.

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

  • Martin Dráb Profile Picture
    233,043 Most Valuable Professional on at
    RE: Auto populate Current date and time field in form

    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.

  • Ahmad0751 Profile Picture
    46 on at
    RE: Auto populate Current date and time field in form

    Sir issue resolved.

    Thanks.

  • Martin Dráb Profile Picture
    233,043 Most Valuable Professional on at
    RE: Auto populate Current date and time field in form

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

  • Ahmad0751 Profile Picture
    46 on at
    RE: Auto populate Current date and time field in form

    Thank for help.

  • Martin Dráb Profile Picture
    233,043 Most Valuable Professional on at
    RE: Auto populate Current date and time field in form

    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
    RE: Auto populate Current date and time field in form

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

    Thank you!

  • Suggested answer
    Martin Dráb Profile Picture
    233,043 Most Valuable Professional on at
    RE: Auto populate Current date and time field in form

    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.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,430 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,043 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans