#AcumaticaTnT Generic Inquiries with an =null default parameter value causing errors after upgrade to 2022R1
Not a question, just jotting this down to share with the community.
Historically (at least in 2021 R1 and older) if you wanted to add certain fields as parameters to a generic inquiry (i.e. ProjectCD, Employee ID, etc.) and you wanted the default view to have that field be empty and thus display all projects or all employees, you had to use an =null value in the Default Value field of the parameters tab (see below). If you didn't use the "null" value, the generic inquiry would automatically just pick the first record in the list, which wouldn't give you the desired outcome.
After an upgrade to 2022 R1, when you try to run the inquiry with the =null value, you will get an error: [field] cannot be found in the system.
If you remove the =Null value from the Default values screen, this seems to resolve the issue. It seems like Acumatica now treats an empty default value field as "null" which is a change from how it used to work. I like the change for creating new GI's, but just have a bunch of custom GI's on a bunch of different client sites that need to be updated now.
Hey Megan, I was excited to see this as we were having the same issue and weren't sure what to do about it.
However, when I left the default value empty it still auto-fills a value, even though I removed the default value from the Sales Order Preferences screen. (The GI is based on SOOrder)
Any ideas on what the difference might be?
That hasn't resolved the issue and the default values are still populating. If I use the =NULL default value, I don't get an error and the parameter fields show empty, but the GI doesn't generate any results.
Hopefully more people see this and have ideas about how to solve the issue!
I wanted to add a bit more here, as I've found a few nuances to how this seems to work...
I had a query that was using ARInvoice.ProjectID. With =null as the default value I would get an error. Leaving the default value field blank would just result in project "X" displaying.
However, if I brought in the source table (PMProject) for Project IDs and used PMProject.ContractCD instead, then I could use From Schema = True and Default Value =Null and it works as originally intended.
(It also seems like there may have been some changes to the issue I noted above. I first noticed the issue in 22.103 and now in Build 22.113.0040 it's a bit different and now sometimes seems to continue to accept the =null value where it didn't in the earlier release)
Hi, has anyone found a fix for this? I tried removing and the field auto fills as well. We are working on upgrading to 2022 r2 and I have many GIs that have =Null.