Notifications
Announcements
No record found.
greeting everyone
in my report i'm trying to pass null value to time field but i get error
here's my code
if(any2real(jmgStampJournalTrans.StartTime)!=0) { caclutedeAbsenceTMP.Shift1From=jmgStampJournalTrans.StartTime; } else { caclutedeAbsenceTMP.Shift1From=null; }
Hi Mohammed,
You can't pass null values to the time field. Instead, you can add new "NoYes" field Shift1FromIsNotSpecified and mark it as Yes to indicate that it's null. Or you can just put 0 if time can't be 00:00:00.
BR, Sergei
The null reference can be used only for reference types, which isn't the case of utcDateTime. Instead, you can use a default value. One of the way how you can get it is calling utcDateTimeNull().
You can learn a bit more details from AX documentation, such as Null Values for Data Types.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 592 Most Valuable Professional
André Arnaud de Cal... 478 Super User 2025 Season 2
BillurSamdancioglu 305 Most Valuable Professional