Field 'IntrastatCode' in table 'CompanyInfo' has not been explicitly selected

Hello

We have just installed Docentric and i try to use the Print management destination to send the invoice (Free Text Invoice) by email.
When i invoice, i get the error message:
Field ‘IntrastatCode’ in table ‘CompanyInfo’ has not been explicitly selected.

The company is based in Switzerland and doesn’t need Intrastat code. Morever the field is greyed in the company.

Could you help?

D365FO
Installed product version : 10.0.41 (10.0.2015.78)
Installed platform version : Update65 (7.0.7367.67)

Docentric

  • Docentric AX 3.4.8.5 (isv)
  • Docentric AX CBD Replicas 3.4.8.1 (isv)
  • Docentric AX Emails 3.4.8.5 (isv)
  • Docentric AX Extension 3.4.8.5 (isv)
  • Docentric AX SSRS Replicas 3.4.8.1 (isv)

Hi @Olivier ,

We have encountered a similar case and it seems that it is a minor data inconsistency. One of our customers found out while debugging that the Intrastat field is actually NULL in DB Buffer, when he changed the NULL to “” before this field has been processed the error wasn’t raised. It seems that the company record must have been populated with some procedure which is why the issue persists.
I recommend running an update and converting NULL values to empty strings.

You can use this approach from Microsoft and Run a custom script to correct the data - Run custom X++ scripts with zero downtime - Finance & Operations | Dynamics 365 | Microsoft Learn

This feature is intended for correction of minor data inconsistencies.

I suggest trying the suggested approach on the DEV environment and going from there.

Hi @SemirT

We applied your solution and it works properly now.
Thank you very for this and you prompt response.

Regards
Olivier