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 NAV (Archived)

Fill a field with datetime

(0) ShareShare
ReportReport
Posted on by

Hi,

I'm new to Nav. I need to fill datetime automatically representing the time when a new record is created in table "trans. Sales entry". I have added to this table a new filled "replicationTime". I know i have to use the on insert trigger. But i need the coding for that. Can anyone help !

Thank you,

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Aleksandar Totovic Profile Picture
    16,765 on at

    You need to add on InitRecord() part of code, depends what you want:

    1) Date and Time -> "ReplicationTime" := CURRENTDATETIME;

    2) Only Time -> "ReplicationTime" := TIME;

    3) Only Date -> "ReplicationTime" := TODAY;

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 NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans