microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
733 stars 243 forks source link

EU VAT Registration No. Validation - issue #7140

Closed CChub402 closed 2 years ago

CChub402 commented 2 years ago

1. Describe the bug

When EU VAT REgistration No. Validation service enabled in Service connections as shown below,

image

We get the following error when a VAT registration number is entered in customer, vendor or contact card page

A call to System.Xml.XmlDocument.Load failed with this message: '>' is an unexpected token. The expected token is '"' or '''. Line 1, position 55.

image

2. To Reproduce Search for Service connections in Business central web client, and select the option "EU VAT Registration No. Validation service" and enable it. Open Customer card page and type in a value for "VAT Registration No." field.

3. Expected behavior "VAT Registration No." validation check goes through without any error.

4. Actual behavior An error occurs with the message "A call to System.Xml.XmlDocument.Load failed with this message: '>' is an unexpected token. The expected token is '"' or '''. Line 1, position 55"

5. Versions In every Business central versions

dannoe commented 2 years ago

see https://www.yammer.com/qbsdachpartnernetwork/#/threads/show?threadId=1876461175873536

devKomak commented 2 years ago

see https://www.yammer.com/qbsdachpartnernetwork/#/threads/show?threadId=1876461175873536

Hi. Could you paste solution here?

dannoe commented 2 years ago

Sorry, I didn't notice I posted an non-official microsoft yammer group. (and it's even in german 😅) Heres a link for the official microsoft dynamics nav yammer: https://www.yammer.com/dynamicsnavdev/#/threads/show?threadId=1867655035756544

For SaaS an update/hotfix should be released this week. For OnPrem - NAV 2018 and forward a CU will be released in september For OnPrem before NAV 2018 no update is planned. You can try to fix it yourself. A user posted this: grafik

Another user posted he had to upgrade 2 Codeunits on NAV 2017:

Codeunit 248 VAT Lookup Ext. Data Hndl Codeunit 1290 SOAP Web Service Request Mgt.

CChub402 commented 2 years ago

Perfect. Thanks. It works

MarcGretener commented 1 year ago

In case the user is using NAV2016 the hotfix applies to Codeunit 248 and 1290 as suggested. The hotfix in Codeunit 248, is stated above, however the function SetContentType does not exist in Codeunit 1290 1) In codeunit 1290 add the Global variable GlobalContentType, DataType Text

2) Add the function SetContentType: image

3) Modify function BuildWebRequest: image

Done