Codeunit 6401 "E-Document PEPPOL Utility"
EDocument · Microsoft.eServices.EDocument.Processing.Import
Across versions
- BC23-28not present
- BC29-30present
EDocument · Microsoft.eServices.EDocument.Processing.Import · BC29-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| Access | Public |
Procedures
InitializePEPPOL3Namespaces(var XmlNamespaces: XmlNamespaceManager): Registers the standard PEPPOL BIS 3.0 UBL namespace prefixes on the namespace manager so that subsequent XPath lookups can resolve cac, cbc, and document-type namespaces.TryGetStringValue(XMLDocument: XmlDocument; XMLNamespaces: XmlNamespaceManager; Path: Text; var Value: Text): Boolean: Reads the value at the specified XPath, resolving either an element’s inner text or an attribute value.SetStringValueInField(XMLDocument: XmlDocument; XMLNamespaces: XmlNamespaceManager; Path: Text; MaxLength: Integer; var Field: Text): Reads the value at the specified XPath and copies it into the destination field, truncated to the target length.SetNumberValueInField(XMLDocument: XmlDocument; XMLNamespaces: XmlNamespaceManager; Path: Text; var DecimalValue: Decimal): Reads the value at the specified XPath and evaluates it into the destination decimal field when present.SetDateValueInField(XMLDocument: XmlDocument; XMLNamespaces: XmlNamespaceManager; Path: Text; var DateValue: Date): Reads the value at the specified XPath and evaluates it into the destination date field when present.SetCurrencyValueInField(XMLDocument: XmlDocument; XMLNamespaces: XmlNamespaceManager; Path: Text; MaxLength: Integer; var CurrencyCode: Code[10]): Reads the currency code at the specified XPath and copies it into the destination field when it differs from the local currency.GetNodeValue(XMLDocument: XmlDocument; XMLNamespaces: XmlNamespaceManager; Path: Text): Text: Returns the value of the node or attribute at the specified XPath, or an empty string when the node is missing.PopulateSupplierInfo(PeppolXML: XmlDocument; XmlNamespaces: XmlNamespaceManager; RootPath: Text; var Header: Record "E-Document Purchase Header")(internal): Extracts AccountingSupplierParty and PayeeParty fields from a UBL document. Per PEPPOL BIS 3.0: PartyName is optional; RegistrationName is mandatory fallback. PayeeParty, when present, overrides vendor name and VAT ID. SchemeID 0088 on EndpointID = GLN.PopulateCustomerInfo(PeppolXML: XmlDocument; XmlNamespaces: XmlNamespaceManager; RootPath: Text; var Header: Record "E-Document Purchase Header")(internal): Extracts AccountingCustomerParty fields from a UBL document. Per PEPPOL BIS 3.0: PartyName is optional; RegistrationName is mandatory fallback. SchemeID 0088 on EndpointID = GLN. Customer Company Id stores schemeID:value.PopulateAmountsAndDates(PeppolXML: XmlDocument; XmlNamespaces: XmlNamespaceManager; RootPath: Text; DueDatePath: Text; var Header: Record "E-Document Purchase Header")(internal): Extracts LegalMonetaryTotal amounts, IssueDate, and DueDate from a UBL document. DueDatePath is parameterized because Invoice uses /cbc:DueDate while CreditNote uses /cac:PaymentMeans/cbc:PaymentDueDate.PopulateCurrency(PeppolXML: XmlDocument; XmlNamespaces: XmlNamespaceManager; RootPath: Text; var Header: Record "E-Document Purchase Header")(internal): Extracts DocumentCurrencyCode and applies the BC LCY-blank convention.PopulatePurchaseLine(LineXML: XmlDocument; XmlNamespaces: XmlNamespaceManager; var Line: Record "E-Document Purchase Line"; LineElementName: Text; QuantityElementName: Text)(internal): Populates a staging line record from a UBL InvoiceLine or CreditNoteLine element. LineElementName and QuantityElementName are parameterized to handle both document types.ExtractAttachment(EDocument: Record "E-Document"; AttachmentXML: XmlDocument; XmlNamespaces: XmlNamespaceManager)(internal): Extracts a single embedded base64 attachment from an AdditionalDocumentReference element. Skips external URI references and bare references without embedded content. Per PEPPOL BIS 3.0: @filename and @mimeCode are mandatory on EmbeddedDocumentBinaryObject.SetCurrencyIfForeign(CurrencyFromXml: Text; var CurrencyCode: Code[10]): BC convention: blank Currency Code means LCY. Sets the field to the currency code only if it differs from LCY. Explicitly blanks the field when it matches LCY.
Plus 2 local procedures.
Recent changes
- 2026-07-23 #9426 [E-Document Formats] Migrate NAV PRs 247170 and 247176 into BCApps (main, BC30, feature)
Ask your agent
Procedure bodies are not stored here (D10). For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: bcatlas_resolve_node(object_type: "codeunit", object_name: "E-Document PEPPOL Utility"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.