Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Field 'VATNum' in table 'CompanyInfo' has not been explicitly selected.

(0) ShareShare
ReportReport
Posted on by 475

Dear All,

I am getting the below error when I am trying to Post a Sales order.

I have AX 2012 r2 Kernel version : 6.2.1000.4051 and Application version : 6.2.158.0

The error details are as below.

Stack trace: Field 'VATNum' in table 'CompanyInfo' has not been explicitly selected.

Stack trace

(S)\Classes\SalesInvoiceDP\insertIntoSalesInvoiceHeaderFooterTmp - line 47 (S)\Classes\SalesInvoiceDP\insertInvoiceHeaderInformation - line 16 (S)\Classes\SalesInvoiceDPBase\createData - line 17 (S)\Classes\SalesInvoiceJournalPostBase\createReportData - line 38 (S)\Classes\FormletterService\run - line 106 (S)\Classes\FormletterService\postSalesOrderInvoice - line 14 (S)\Classes\DictClass\callObject (S)\Classes\SysOperationServiceController\runOperation - line 93 (S)\Classes\SysOperationServiceController\run - line 27 (S)\Classes\FormLetterServiceController\run - line 3 (S)\Classes\SalesFormLetter\run - line 72 (S)\Classes\SalesFormLetter_Invoice\run - line 6 (S)\Classes\SalesFormLetter\runServer - line 9 (C)\Classes\SalesFormLetter\run (C)\Classes\SalesFormLetter_Invoice\run (C)\Classes\SalesFormLetter\main (C)\Classes\FormFunctionButtonControl\Clicked

I checked in CompanyInfo Table from table browser in AX, and found that the vatnum field value is showing "Unretired".

How can I update this field value. I am not able to edit this field from table browser nor select it from SQL.

I Google the issues and I found the below link and I tried but nothing worked out.

https://community.dynamics.com/ax/f/33/p/106091/208207.aspx#208207

 

Please help in solving this issue.

 

Hope for kind assistance and support.

 

Thanks & Regards.

 

*This post is locked for comments

  • Verified answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,516 Super User 2025 Season 1 on at
    RE: Field 'VATNum' in table 'CompanyInfo' has not been explicitly selected.

    Hi AX,

    Within the SQL server, you can edit rows from the DirPartyTable. This table contains this field. Use a script like Dick Wenning shared in his blog post (www.axstart.com/unretrieved-values-on-the-companyinfo-table-in-ax-2012r2) or edit the fields in the records where these field show NULL manually.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans