When sending electronic invoices via the Sproom Connector in Business Central (Danish localization), the system hardcodes the Bill-to Country/Region Code as a prefix on the CVR number and tags it with schemeID = DK:CVR in the generated XML, regardless of the actual country of the customer.
This issue was identified in collaboration with our Business Central partner, Abakion, who confirmed after reviewing the source code that the behavior is hardcoded in Microsoft's standard Danish localization with no configuration available to work around it.
This causes invoices to fail Sproom validation when the Bill-to customer is located outside Denmark, as the generated party identification does not match the DK:CVR scheme requirements.
The relevant codeunit is 13648 "OIOUBL-Common Logic".
Steps to reproduce:
1. Create a customer with Country/Region Code = FO (Faroe Islands)
2. Assign a valid GLN number and enable "Use GLN in Electronic Documents"
3. Leave VAT Registration No. blank (or populate with a local registration number)
4. Post a sales invoice and attempt to send it via Sproom Connector
Expected behavior:
The connector should either:
- Use the GLN as the sole party identifier when "Use GLN in Electronic Documents" is enabled, omitting the CVR/VAT identification entirely for non-DK customers, OR
- Derive the correct schemeID from the country code table setup (e.g. FO:ENR for Faroe Islands) rather than defaulting to DK:CVR
Actual behavior:
The XML output contains a cac:PartyIdentification block with schemeID = DK:CVR and the country code (e.g. 'FO') prepended to the registration number, causing the following Sproom validation error:
"[F-LIB184] schemeID = DK:CVR, ID must be a valid CVR number (like 'DK12345678', value found: 'FO')"
Impact:
Invoices to customers in the Faroe Islands (and potentially other non-DK countries using the Danish localization) cannot be sent electronically via Sproom. There is no configuration available to work around this, the behavior is hardcoded in the standard Danish localization.
Workaround:
Manually creating invoices directly in the Sproom portal, bypassing Business Central entirely.
Requested fix:
Please update the Danish localization so that the country code table setup is respected when determining the schemeID for party identification in e-documents, consistent with what a user would reasonably expect from the existing configuration options.
