Hi all,
So I added column 50000 "Shipment Date Time" as DateTime to the Sales Shipment Line table. I added this code to the table's OnInsert trigger:
OnInsert()
"Shipment Date Time" := CURRENTDATETIME;
The result is the George Washington date. I have tried various ways of doing this including On Validate of the Type and Item but to no avail. I even opened the table in sql and set the default date to GETDATE() on this column. Nothing!
I set the InitValue to 't' and it sets the date to today, but does nothing with the time.
The only thing that I have gotten to work is to add a Trigger to the Sql Table and it works up until somebody tries to do an 'undo' shipment and gets an error because of the trigger and cannot undo the shipment.
I don't understand why DateTime is such a difficult concept in NAV. Why doesn't my one line simple code "Shipment Date Time" := CURRENTDATETIME; work?
Thank you!
Kevin
*This post is locked for comments