Hello !
How can I hide the value in a grid if the date is minvalue type (1900-01-01)
Currently showing 12:00:00 and I need you to show nothing.
Thanks
*This post is locked for comments
I'm sorry but I could not solve my problem
Hi Ismaelivan,
AX does not support the concept of null values. A field in Microsoft Dynamics AX always has a type and a value. So if you use a datetime field you will obtain a null value as: refer to: msdn.microsoft.com/.../aa846236.aspx.
As suggestion, you can use a dataMethod in the grid to convert datetime to string e show the string null value. I think that's what you want to see.
datetime2string:
msdn.microsoft.com/.../cc637978.aspx
Please mark verified if this answers your question.
Regards.
Hi,
initValue method will be called only when we create a record and not during updates.Please try the same statement i.e Table.DateTime = utcDateTimeNull() when you update the record(s) from other process.
Thanks,Chaitanya Golla
Don't enter in method :(
And I do not think it necessary to put it in the table insert method because the records already exist.
Only from other process, i update the datetime.
No problem. initValue(on formdatsource) is the method that gets called when a record is created. Please try statement Table.DateTime = utcDateTimeNull() in initvalue (or) in the insert method of the table and also if the datetime is mandatory check by making it optional.
Thanks,
Chaitanya
Hi Chaitanya, I filled the grid with a button, set a range.
Does not enter the initvalue() method, then insert the line in the method init()
But still showing the time in the column :(
Sorry for my English, I'm from Mexico
This show in SQL
Is the datetime field mandatory on your table? if so I feel it's trying to assign some value. Please try the following code in your data source initvalue method on your form.
Table.DateTime = DateTimeUtil::MinValue();
(or)
Table.DateTime = utcDateTimeNull();
Chaitanya Golla
Already use sysutcdatetime but still the time appears, compile and update the table, incremental cyl and restart, but the EDT does not appear in the grid field.
I do not use any EDT.
I will use sysutcdatetime and I send you my comments.
Thanks!
Could you let us know the EDT that you are using on your DateTime field.As, when I used SysDateTime EDT I am able to get blank value on form and table and
on the backend it stores as "1900-01-01 00:00:00.000".
If it's a custom field you can change its EDT to SysDateTime and check.
Refer screen shot below(Colored in yellow):
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 Andrés Arias as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Syed Haris Shah 9
Mea_ 4
Rahul Shah 2