I created a test codeunit and set it up to run from a job queue. It ran fine with no errors, but did not populate the table. I added a message to make sure the date was formatted correctly, and it is. I ran the codeunit without the job queue and it ran with no errors. Here is the code I used:
Documentation()
OnRun()
WITH JobQueueTestLog DO BEGIN
TestDateTime := CURRENTDATETIME;
MESSAGE(FORMAT(TestDateTime));
JobQueueTestLog.INIT;
JobQueueTestLog."Date Time" := TestDateTime ;
END;
My table has two fields, Entry No. (with AutoIncrement set to Yes, data type is Integer), and 'Date Time' (data type set to DateTime). Any ideas on why it won't add anything to the table??? Thanks!
0
Answers