KVSEDX GS1 BMS DESADV IMP#
Events#
OnAfterAssignVariableHeaderData(Record KVSEDX Purch. Receipt Header, XmlAttributeCollection, XmlNode, Boolean) :#
Summary: The OnAfterAssignVariableHeaderData event is fired when an avpList is processed in the order header. The "KVSEDX Sales Header" is already inserted at this time. The GS1XmlAttributeCollection can be used to query the attribute of the avpList element. GS1AttributeValuePairXmlNode contains the corresponding value.
[IntegrationEvent(true, false)]
local procedure OnAfterAssignVariableHeaderData(var KVSEDXPurchReceiptHeader: Record "KVSEDX Purch. Receipt Header"; GS1XmlAttributeCollection: XmlAttributeCollection; GS1AttributeValuePairXmlNode: XmlNode; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX GS1 BMS DESADV IMP", 'OnAfterAssignVariableHeaderData', '', false, false)]
local procedure DoSomethingOnAfterAssignVariableHeaderData(var KVSEDXPurchReceiptHeader: Record "KVSEDX Purch. Receipt Header"; GS1XmlAttributeCollection: XmlAttributeCollection; GS1AttributeValuePairXmlNode: XmlNode; var IsHandled: Boolean)
begin
end;
Parameters:
KVSEDXPurchReceiptHeader: Current KVSEDX Purch. Receipt HeaderGS1XmlAttributeCollection: Attribute Collection for this AttributeValuePairGS1AttributeValuePairXmlNode: Node with ValueIsHandled: Indicates if the event has been handled
Example:
foreach GS1XmlAttribute in GS1XmlAttributeCollection do
if (GS1XmlAttribute.Name = 'attributeName') then
case GS1XmlAttribute.Value of
'PROJ_DATA_1':
KVSEDXSalesHeader."Project Field 1" := CopyStr(GS1XmlNode.AsXmlElement().InnerText, 1, MaxStrLen(KVSEDXSalesHeader."Project Field 1"));
'PROJ_DATA_2':
KVSEDXSalesHeader."Project Field 2" := CopyStr(GS1XmlNode.AsXmlElement().InnerText, 1, MaxStrLen(KVSEDXSalesHeader."Project Field 2"));
end;
KVSEDXSalesHeader.Modify(true);
OnBeforeProcessHeader(Record KVSEDX Purch. Receipt Header, XmlNamespaceManager, XmlElement, XmlNode, Boolean) :#
Summary: Integration event fired before processing a GS1 despatch advice header document. This event allows subscribers to perform custom preprocessing or validation before the standard header processing begins. Use this event to implement custom business logic, field mappings, or data validation for despatch advice headers.
[IntegrationEvent(true, false)]
local procedure OnBeforeProcessHeader(var KVSEDXPurchReceiptHeader: Record "KVSEDX Purch. Receipt Header"; var GS1XmlNamespaceManager: XmlNamespaceManager; var GS1XmlRootElement: XmlElement; var GS1OrderXmlNode: XmlNode; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX GS1 BMS DESADV IMP", 'OnBeforeProcessHeader', '', false, false)]
local procedure DoSomethingOnBeforeProcessHeader(var KVSEDXPurchReceiptHeader: Record "KVSEDX Purch. Receipt Header"; var GS1XmlNamespaceManager: XmlNamespaceManager; var GS1XmlRootElement: XmlElement; var GS1OrderXmlNode: XmlNode; var IsHandled: Boolean)
begin
end;
Parameters:
KVSEDXPurchReceiptHeader: The KVSEDX purchase receipt header record being processedGS1XmlNamespaceManager: The XML namespace manager for GS1 document navigationGS1XmlRootElement: The root XML element of the GS1 despatch advice documentGS1OrderXmlNode: The current despatch advice XML node being processedIsHandled: Set to true if the subscriber has handled the processing and wants to skip standard processing
OnAfterProcessHeader(Record KVSEDX Purch. Receipt Header, XmlNamespaceManager, XmlElement, XmlNode, Boolean) :#
Summary: Integration event fired after processing a GS1 despatch advice header document. This event allows subscribers to perform custom postprocessing after the standard header processing is complete. Use this event to implement additional business logic, custom field updates, or integration with external systems.
[IntegrationEvent(true, false)]
local procedure OnAfterProcessHeader(var KVSEDXPurchReceiptHeader: Record "KVSEDX Purch. Receipt Header"; var GS1XmlNamespaceManager: XmlNamespaceManager; var GS1XmlRootElement: XmlElement; var GS1OrderXmlNode: XmlNode; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX GS1 BMS DESADV IMP", 'OnAfterProcessHeader', '', false, false)]
local procedure DoSomethingOnAfterProcessHeader(var KVSEDXPurchReceiptHeader: Record "KVSEDX Purch. Receipt Header"; var GS1XmlNamespaceManager: XmlNamespaceManager; var GS1XmlRootElement: XmlElement; var GS1OrderXmlNode: XmlNode; var IsHandled: Boolean)
begin
end;
Parameters:
KVSEDXPurchReceiptHeader: The KVSEDX purchase receipt header record that was processedGS1XmlNamespaceManager: The XML namespace manager for GS1 document navigationGS1XmlRootElement: The root XML element of the GS1 despatch advice documentGS1OrderXmlNode: The current despatch advice XML node that was processedIsHandled: Set to true if the subscriber has performed additional processing that should affect subsequent operations
OnAfterAssignVariableLineData(Record KVSEDX Purch. Receipt Line, XmlNodeList, Boolean) :#
Summary: The OnAfterAssignVariableLineData event is fired when an avpList is processed in the order line. The "KVSEDX Sales Line" is already inserted at this time. The GS1XmlAttributeCollection can be used to query the attribute of the avpList element. GS1AttributeValuePairXmlNode contains the corresponding value.
[IntegrationEvent(true, false)]
local procedure OnAfterAssignVariableLineData(var KVSEDXPurchReceiptLine: Record "KVSEDX Purch. Receipt Line"; GS1AttributeValuePairXmlNodeList: XmlNodeList; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX GS1 BMS DESADV IMP", 'OnAfterAssignVariableLineData', '', false, false)]
local procedure DoSomethingOnAfterAssignVariableLineData(var KVSEDXPurchReceiptLine: Record "KVSEDX Purch. Receipt Line"; GS1AttributeValuePairXmlNodeList: XmlNodeList; var IsHandled: Boolean)
begin
end;
Parameters:
KVSEDXPurchReceiptLine: Current KVSEDX Purch. Receipt LineGS1AttributeValuePairXmlNodeList: Attribute Collection for this AttributeValuePairIsHandled: Indicates if the event has been handled
Example:
foreach GS1AttributeValuePairXmlNode in GS1AttributeValuePairXmlNodeList do begin
GS1XmlAttributeCollection := GS1AttributeValuePairXmlNode.AsXmlElement().Attributes();
if (GS1XmlAttributeCollection.Count > 0) then begin
foreach GS1XmlAttribute in GS1XmlAttributeCollection do
if (GS1XmlAttribute.Name = 'attributeName') then
case GS1XmlAttribute.Value of
'PROJ_DATA_1':
KVSEDXSalesLine."Project Field 1" := CopyStr(GS1XmlNode.AsXmlElement().InnerText, 1, MaxStrLen(KVSEDXSalesLine."Project Field 1"));
'PROJ_DATA_2':
KVSEDXSalesLine."Project Field 2" := CopyStr(GS1XmlNode.AsXmlElement().InnerText, 1, MaxStrLen(KVSEDXSalesLine."Project Field 2"));
end;
KVSEDXSalesLine.Modify(true);
OnBeforeProcessLine(Record KVSEDX Purch. Receipt Line, XmlNamespaceManager, XmlNode, Boolean) :#
Summary: Integration event fired before processing a GS1 despatch advice line item. This event allows subscribers to perform custom preprocessing or validation before the standard line processing begins. Use this event to implement custom line-level business logic, item mappings, or quantity validations.
[IntegrationEvent(true, false)]
local procedure OnBeforeProcessLine(var KVSEDXPurchReceiptLine: Record "KVSEDX Purch. Receipt Line"; var GS1XmlNamespaceManager: XmlNamespaceManager; var GS1LineXmlNode: XmlNode; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX GS1 BMS DESADV IMP", 'OnBeforeProcessLine', '', false, false)]
local procedure DoSomethingOnBeforeProcessLine(var KVSEDXPurchReceiptLine: Record "KVSEDX Purch. Receipt Line"; var GS1XmlNamespaceManager: XmlNamespaceManager; var GS1LineXmlNode: XmlNode; var IsHandled: Boolean)
begin
end;
Parameters:
KVSEDXPurchReceiptLine: The KVSEDX purchase receipt line record being processedGS1XmlNamespaceManager: The XML namespace manager for GS1 document navigationGS1LineXmlNode: The current despatch advice line XML node being processedIsHandled: Set to true if the subscriber has handled the processing and wants to skip standard processing
OnAfterProcessLine(Record KVSEDX Purch. Receipt Line, XmlNamespaceManager, XmlNode, Boolean) :#
Summary: Integration event fired after processing a GS1 despatch advice line item. This event allows subscribers to perform custom postprocessing after the standard line processing is complete. Use this event to implement additional line-level business logic, custom calculations, or integration workflows.
[IntegrationEvent(true, false)]
local procedure OnAfterProcessLine(var KVSEDXPurchReceiptLine: Record "KVSEDX Purch. Receipt Line"; var GS1XmlNamespaceManager: XmlNamespaceManager; var GS1LineXmlNode: XmlNode; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX GS1 BMS DESADV IMP", 'OnAfterProcessLine', '', false, false)]
local procedure DoSomethingOnAfterProcessLine(var KVSEDXPurchReceiptLine: Record "KVSEDX Purch. Receipt Line"; var GS1XmlNamespaceManager: XmlNamespaceManager; var GS1LineXmlNode: XmlNode; var IsHandled: Boolean)
begin
end;
Parameters:
KVSEDXPurchReceiptLine: The KVSEDX purchase receipt line record that was processedGS1XmlNamespaceManager: The XML namespace manager for GS1 document navigationGS1LineXmlNode: The current despatch advice line XML node that was processedIsHandled: Set to true if the subscriber has performed additional processing that should affect subsequent operations