Cannot read a record in Ledger journal table. An unsupported NULL value has been selected from the database.
after removing Avatax from our environment, we are seeing this error popping up in PMA / Journals / Expense only. This is only an issue in the two environments where the model was removed (build, synced, everything ok). There are indeed NULL values in the log field, but that does not appear to be a problem in other environments.
Has anyone an idea what might be causing this ? I don't see the correlation to the removal of the tax software.
Replacing the NULL values with blanks does fix the problem, but that is not an option in Tier2 Environments nor should it be required, right ?
Cannot read a record .. An unsupported NULL value has been selected from the database.
Martin,
this all makes sense except for I have another environment where I did not remove that AvaModel and NULL values in the LedgerJournalTable.Log field do not appear to be a problem at all. There's over 1000 records that all have a NULL value in the log and that is probably the same for our T2 environments where the data originates from (data refresh). Only the two dev boxes where the model was removed show this symptom.
There is also no easy fix for this. Since I can't fetch (and update) these (or all) records from the DB in X++, the only option is to run an update in sql db - which is not an option if the same thing happens in production.
Martin Dráb230,445Most Valuable Professional
on at
Cannot read a record .. An unsupported NULL value has been selected from the database.
No, it's not normal. Null isn't an allowed value of the string data type in F&O. If a journal is posted without an error, the Log field have the default value, which is an empty string. A null value in DB means data corruption; the value can't be interpreted in F&O.
Isn't not about strlen(this.Log). The error Cannot read a record .. An unsupported NULL value has been selected from the database. says that the value can't be fetched from the database. Therefore it never reaches the display method you mentioned; it fails already when reading the data from DB.
Cannot read a record .. An unsupported NULL value has been selected from the database.
Martin,
the problem is that those NULL values in the log field (varChar) only became a problem once that model was removed. Every project expense journal that gets posted without an error has a NULL value in its log. If I look at another environment that pretty much has the same data, those NULL values are not a problem.
I'm not sure why this code can't deal with a NULL value :
I'm aware of the JIT access and I could run a job in production to clean this, but this will not affect future journals. The root cause of the problem needs to be addressed.
A full model build and sync didn't change anything.
Suggested answer
Martin Dráb230,445Most Valuable Professional
on at
Cannot read a record .. An unsupported NULL value has been selected from the database.
You selected Dynamics AX category, but the remark about Tier2 suggests that you're actually talking about F&O.
Replacing null values with empty strings is possible in T2 environments too (although it's not ideal, of course). On LCS, you can enable access to the SQL database and fix the data.
Unfortunately, I have no idea how a removal of a model could put such an invalid value to the Log field.
Cannot read a record .. An unsupported NULL value has been selected from the database.
Hi,
you need to run a full buld with database synchronization.
Best regards,
Mohamed Amine MAHMOUDI
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.