If you want to set a date field to an empty date or need to compare if a date field is empty, you can use the datenull() function. It is a method of the Global class and will simply return 011\1900.
This leads to more things:
- You can write dates in Axapta X++ editor using backslashes, e.g. 144\2006
- An empty date in Axapta is specified as January 1st, 1900.
- You
can use methods from the Global class without having to write
“Global::”. So, you can write “if date == datenull()” and you do not
have to write “if date == Global::datenull()”. This works with all the
methods from the Global class.