Provide the file name of the attachment

Error FX-SCH-A-000286 Factur-X

Attribute '@filename' is required in this context.

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

The filename attribute is missing from ram:AttachmentBinaryObject.

What the rule means

The filename attribute provides the file name of the attachment.

Please provide the file name of the attachment

The filename attribute is missing from ram:AttachmentBinaryObject. Add the attachment’s file name.

What to do
  1. Add the filename attribute to ram:AttachmentBinaryObject.
  2. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:AttachmentBinaryObject mimeCode="application/pdf">QQ==</ram:AttachmentBinaryObject>
✓ Correct
<ram:AttachmentBinaryObject mimeCode="application/pdf" filename="document.pdf">QQ==</ram:AttachmentBinaryObject>
Technical details

The test checks whether the filename attribute is present on the current ram:AttachmentBinaryObject.

Where the rule applies

The rule applies to the filename attribute of ram:AttachmentBinaryObject for the embedded document.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:AdditionalReferencedDocument[ram:TypeCode="916"]/ram:AttachmentBinaryObject
Test expression (assert/@test)
@filename