web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Cannot read a record .. An unsupported NULL value has been selected from the database.

(1) ShareShare
ReportReport
Posted on by 17
Hello,
 
 
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 ?
 
Thanks
I have the same question (0)
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,431 Super User 2025 Season 2 on at
    Hi,
     
    you need to run a full buld with database synchronization.
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • Suggested answer
    Frank Bruemmer Profile Picture
    354 on at
    MIke,
     
    Did you try a full build of the AppSuite model (that's where the LedgerJournalTable lives) plus a db sync ?
     
    Best regards
     
    Frank
  • Suggested answer
    Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at
    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.
  • Mike Jones II Profile Picture
    17 on at
    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 :
    (LedgerJournalTable table)
     
       display boolean logged()
       {
           return strlen(this.Log) > 0;
       } 
     
    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.
  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at
    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.
  • Mike Jones II Profile Picture
    17 on at
    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.

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 503 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 434 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans