Invalid product end user country code

Error FX-SCH-A-000724 Factur-X

Value of 'ram:CountryID' is not allowed.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

A non-empty value in ram:CountryID is not included in the code list allowed for this field. This check accepts an empty value.

What the rule means

The country code associates the postal address with a country. An unallowed code can prevent the country from being identified unambiguously.

Please check the product end user's country code

The value in ram:CountryID was not recognized as an allowed country code. You can check the entry against the permitted code list.

What to do
  1. Locate ram:CountryID in the product end user's postal address.
  2. Check whether the entered code is included in the code list permitted for this field.
  3. Generate the invoice again and validate it.
Technical details

The check accepts an empty value or a value listed in the code list with identifier 10.

Where the rule applies

The rule applies to ram:CountryID in the product end user's postal address.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:ProductEndUserTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ ram:CountryID
Test expression (assert/@test)
string-length($codeValue10)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=10]/enumeration[@value=$codeValue10]