Skip to content

KVSEDX Base Data Processing#

Procedures#

CreateXMLDocument(RecordRef, Code[30], Code[30], OutStream, Guid) :#

Summary: Creates a standardized EDX XML document structure with transmission header and record data. Builds an XML document with EDXTransmission root, TransmissionID element, and a list containing the record data nodes.

procedure CreateXMLDocument(ParRecordRef: RecordRef; ParEDXPartnerNo: Code[30]; ParEDXDocument: Code[30]; var VarXmlOutStream: OutStream; TransmissionIDPar: Guid): 

Parameters:

  • ParRecordRef: Source record reference containing the data to be converted to XML nodes.
  • ParEDXPartnerNo: EDX partner number used for field mapping configuration during XML node creation.
  • ParEDXDocument: EDX document code used for field mapping configuration during XML node creation.
  • VarXmlOutStream: Output stream where the complete XML document will be written.
  • TransmissionIDPar: Unique transmission GUID that will be included as TransmissionID element in the XML.

Events#

OnCheckModificationCustomer(Record Customer, Record Customer, Boolean, Boolean) :#

Summary: Integration event fired when checking if customer modifications should trigger EDX outbound processing. Allows custom logic to determine whether customer changes should be sent to EDX partners.

[IntegrationEvent(true, false)]
local procedure OnCheckModificationCustomer(var CustomerVar: Record "Customer"; var xCustomerVar: Record "Customer"; var SendRecordVar: Boolean; var Processed: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX Base Data Processing", 'OnCheckModificationCustomer', '', false, false)]
local procedure DoSomethingOnCheckModificationCustomer(var CustomerVar: Record "Customer"; var xCustomerVar: Record "Customer"; var SendRecordVar: Boolean; var Processed: Boolean)
begin
end;

Parameters:

  • CustomerVar: Modified customer record
  • xCustomerVar: Original customer record before modification
  • SendRecordVar: Set to false to prevent EDX outbound creation for this customer
  • Processed: Set to true if the event subscriber handles the modification check completely

OnCheckModificationVendor(Record Vendor, Record Vendor, Boolean, Boolean) :#

Summary: Integration event fired when checking if vendor modifications should trigger EDX outbound processing. Allows custom logic to determine whether vendor changes should be sent to EDX partners.

[IntegrationEvent(true, false)]
local procedure OnCheckModificationVendor(var VendorVar: Record "Vendor"; var xVendorVar: Record "Vendor"; var SendRecordVar: Boolean; var Processed: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX Base Data Processing", 'OnCheckModificationVendor', '', false, false)]
local procedure DoSomethingOnCheckModificationVendor(var VendorVar: Record "Vendor"; var xVendorVar: Record "Vendor"; var SendRecordVar: Boolean; var Processed: Boolean)
begin
end;

Parameters:

  • VendorVar: Modified vendor record
  • xVendorVar: Original vendor record before modification
  • SendRecordVar: Set to false to prevent EDX outbound creation for this vendor
  • Processed: Set to true if the event subscriber handles the modification check completely

OnCheckModificationItem(Record Item, Record Item, Boolean, Boolean) :#

Summary: Integration event fired when checking if item modifications should trigger EDX outbound processing. Allows custom logic to determine whether item changes should be sent to EDX partners.

[IntegrationEvent(true, false)]
local procedure OnCheckModificationItem(var ItemVar: Record "Item"; var xItemVar: Record "Item"; var SendRecordVar: Boolean; var Processed: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX Base Data Processing", 'OnCheckModificationItem', '', false, false)]
local procedure DoSomethingOnCheckModificationItem(var ItemVar: Record "Item"; var xItemVar: Record "Item"; var SendRecordVar: Boolean; var Processed: Boolean)
begin
end;

Parameters:

  • ItemVar: Modified item record
  • xItemVar: Original item record before modification
  • SendRecordVar: Set to false to prevent EDX outbound creation for this item
  • Processed: Set to true if the event subscriber handles the modification check completely

OnGetDocumentCustomer(Record Customer, OutStream, Boolean) :#

Summary: Integration event fired when creating customer document content for EDX outbound processing. Allows custom document generation logic to override the standard XML creation for customers.

[IntegrationEvent(true, false)]
local procedure OnGetDocumentCustomer(var CustomerVar: Record "Customer"; var OutStreamVar: OutStream; var DocumentAddedVar: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX Base Data Processing", 'OnGetDocumentCustomer', '', false, false)]
local procedure DoSomethingOnGetDocumentCustomer(var CustomerVar: Record "Customer"; var OutStreamVar: OutStream; var DocumentAddedVar: Boolean)
begin
end;

Parameters:

  • CustomerVar: Customer record to create document for
  • OutStreamVar: Output stream to write the custom document content to
  • DocumentAddedVar: Set to true if custom document content was written to the stream

OnGetDocumentVendor(Record Vendor, OutStream, Boolean) :#

Summary: Integration event fired when creating vendor document content for EDX outbound processing. Allows custom document generation logic to override the standard XML creation for vendors.

[IntegrationEvent(true, false)]
local procedure OnGetDocumentVendor(var VendorVar: Record "Vendor"; var OutStreamVar: OutStream; var DocumentAddedVar: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX Base Data Processing", 'OnGetDocumentVendor', '', false, false)]
local procedure DoSomethingOnGetDocumentVendor(var VendorVar: Record "Vendor"; var OutStreamVar: OutStream; var DocumentAddedVar: Boolean)
begin
end;

Parameters:

  • VendorVar: Vendor record to create document for
  • OutStreamVar: Output stream to write the custom document content to
  • DocumentAddedVar: Set to true if custom document content was written to the stream

OnGetDocumentItem(Record Item, OutStream, Boolean) :#

Summary: Integration event fired when creating item document content for EDX outbound processing. Allows custom document generation logic to override the standard XML creation for items.

[IntegrationEvent(true, false)]
local procedure OnGetDocumentItem(var ItemVar: Record "Item"; var OutStreamVar: OutStream; var DocumentAddedVar: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX Base Data Processing", 'OnGetDocumentItem', '', false, false)]
local procedure DoSomethingOnGetDocumentItem(var ItemVar: Record "Item"; var OutStreamVar: OutStream; var DocumentAddedVar: Boolean)
begin
end;

Parameters:

  • ItemVar: Item record to create document for
  • OutStreamVar: Output stream to write the custom document content to
  • DocumentAddedVar: Set to true if custom document content was written to the stream

OnBeforeCreateXMLNode(RecordRef, Code[30], Code[30], XmlNode, Boolean) :#

Summary: Integration event fired before creating XML nodes for a record during XML document generation. Allows complete customization of XML node creation for specific records or field mappings.

[IntegrationEvent(true, false)]
local procedure OnBeforeCreateXMLNode(var SourceRecordRef: RecordRef; EDXPartnerNo: Code[30]; EDXDocument: Code[30]; var TargetXMLNodeList: XmlNode; var Handled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX Base Data Processing", 'OnBeforeCreateXMLNode', '', false, false)]
local procedure DoSomethingOnBeforeCreateXMLNode(var SourceRecordRef: RecordRef; EDXPartnerNo: Code[30]; EDXDocument: Code[30]; var TargetXMLNodeList: XmlNode; var Handled: Boolean)
begin
end;

Parameters:

  • SourceRecordRef: Source record reference containing the data to be converted
  • EDXPartnerNo: EDX partner number for field mapping configuration
  • EDXDocument: EDX document code for field mapping configuration
  • TargetXMLNodeList: Target XML node list where custom nodes should be added
  • Handled: Set to true to bypass standard XML node creation for this record

OnWhitelistFlowField(RecordRef, FieldRef, Boolean) :#

Summary: Integration event fired when determining if FlowFields should be included in XML document generation. By default, FlowFields are excluded, but this event allows whitelisting specific FlowFields for inclusion.

[IntegrationEvent(true, false)]
local procedure OnWhitelistFlowField(var SourceRecordRef: RecordRef; var SourceFieldRef: FieldRef; var Handled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX Base Data Processing", 'OnWhitelistFlowField', '', false, false)]
local procedure DoSomethingOnWhitelistFlowField(var SourceRecordRef: RecordRef; var SourceFieldRef: FieldRef; var Handled: Boolean)
begin
end;

Parameters:

  • SourceRecordRef: Source record reference containing the FlowField
  • SourceFieldRef: FlowField reference to evaluate for inclusion
  • Handled: Set to true to include this FlowField in the XML output, overriding the default exclusion

OnBlobFieldGetBase64(RecordRef, FieldRef, Text, Boolean) :#

Summary: Integration event fired when processing BLOB fields during XML document generation. Allows custom conversion of BLOB field content to Base64 text for XML inclusion.

[IntegrationEvent(true, false)]
local procedure OnBlobFieldGetBase64(var SourceRecordRef: RecordRef; var SourceFieldRef: FieldRef; var Base64Text: Text; var Handled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX Base Data Processing", 'OnBlobFieldGetBase64', '', false, false)]
local procedure DoSomethingOnBlobFieldGetBase64(var SourceRecordRef: RecordRef; var SourceFieldRef: FieldRef; var Base64Text: Text; var Handled: Boolean)
begin
end;

Parameters:

  • SourceRecordRef: Source record reference containing the BLOB field
  • SourceFieldRef: BLOB field reference to convert
  • Base64Text: Output parameter to set the Base64-encoded text representation of the BLOB
  • Handled: Set to true if custom BLOB conversion was performed and Base64Text contains the result