In a gridField() fed by record data, when you try to use the disableRowSelectionWhen param, record references fail to be evaluated. As an example, we were trying to disable row selection based on a date time in the record data. Originally we had it wrapped in a todate() so we could compare it to a date, but the logic was failing to disable the desired rows. Just for fun we removed the todate() around the record field reference, only to be smacked with an error about not being able to compare Null to a date. That's right, the record reference evaluated to Null. For more fun, we tried using fields that were not dates, and the same thing happened on integer fields, i.e. the record reference evaluated to Null.
Has anyone else run into this?
Discussion posts and replies are publicly visible
I just whipped up a simplified example but it seemed to work for me? Or are you saying it's particular to date-type fields?
edit to add: i added a datetime comparison to my logic and that still seems to work ok.
In our case, the grid is being fed by a rule input of type record list, which is passed down from a parent interface. But we also tried replacing the RI with an a!queryRecordType() and got the same results.
can you include a screenshot of the code you're trying?
you're right, when the data comes over that way, something about it seems to "short circuit". throw another log on the pile of reasons i still won't bend over backwards to convert anything to RecordType data...