Use an allowed scheme for the sales agent ID

Error FX-SCH-A-000742 Factur-X

Value of '@schemeID' is not allowed.

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

The non-empty value of @schemeID on ram:GlobalID is not included in the value list used by this rule. The test also accepts an empty value.

What the rule means

The scheme identifier determines how the sales agent’s global identifier is classified. A non-empty scheme identifier must be one of the values allowed for this field.

Please use an allowed scheme for the sales agent ID

The non-empty value of @schemeID on ram:GlobalID is not allowed in the associated value list. Use a value included in that list for this attribute.

What to do
  1. Locate ram:GlobalID for the sales agent.
  2. Check the non-empty value of @schemeID against the value list for this field.
  3. Replace it with a value included in that list.
  4. Generate the invoice again and validate it once more.
Technical details

The check accepts an empty string or a value found in code list 11.

Where the rule applies

On the @schemeID attribute of the sales agent’s ram:GlobalID.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:SalesAgentTradeParty/ram:GlobalID
Test expression (assert/@test)
string-length($codeValue11)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=11]/enumeration[@value=$codeValue11]