Skip to main content

Notifications

Announcements

No record found.

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
  • Mike Jones II Profile Picture
    Mike Jones II 17 on at
    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áb Profile Picture
    Martin Dráb 230,445 Most 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.
  • Mike Jones II Profile Picture
    Mike Jones II 17 on at
    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 :
    (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.
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,445 Most 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.
  • Suggested answer
    Frank Bruemmer Profile Picture
    Frank Bruemmer 343 on at
    Cannot read a record .. An unsupported NULL value has been selected from the database.
    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
    Mohamed Amine Mahmoudi Profile Picture
    Mohamed Amine Mahmoudi 9,818 Super User 2024 Season 2 on at
    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.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans