KVSEDX GS1 BMS ORDRSP IMP#
Events#
OnAfterAssignVariableHeaderData(Record KVSEDX Purchase Header, XmlAttributeCollection, XmlNode, Boolean) :#
Summary: The OnAfterAssignVariableHeaderData event is fired when an avpList is processed in the order header. The "KVSEDX Purchase 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 KVSEDXPurchaseHeader: Record "KVSEDX Purchase Header"; GS1XmlAttributeCollection: XmlAttributeCollection; GS1AttributeValuePairXmlNode: XmlNode; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX GS1 BMS ORDRSP IMP", 'OnAfterAssignVariableHeaderData', '', false, false)]
local procedure DoSomethingOnAfterAssignVariableHeaderData(var KVSEDXPurchaseHeader: Record "KVSEDX Purchase Header"; GS1XmlAttributeCollection: XmlAttributeCollection; GS1AttributeValuePairXmlNode: XmlNode; var IsHandled: Boolean)
begin
end;
Parameters:
KVSEDXPurchaseHeader: Current KVSEDX Purchase HeaderGS1XmlAttributeCollection: Attribute Collection for this AttributeValuePairGS1AttributeValuePairXmlNode: Node with ValueIsHandled: Set to true if custom logic has handled the processing
Example:
foreach GS1XmlAttribute in GS1XmlAttributeCollection do
if (GS1XmlAttribute.Name = 'attributeName') then
case GS1XmlAttribute.Value of
'PROJ_DATA_1':
KVSEDXPurchaseHeader."Project Field 1" := CopyStr(GS1XmlNode.AsXmlElement().InnerText, 1, MaxStrLen(KVSEDXPurchaseHeader."Project Field 1"));
'PROJ_DATA_2':
KVSEDXPurchaseHeader."Project Field 2" := CopyStr(GS1XmlNode.AsXmlElement().InnerText, 1, MaxStrLen(KVSEDXPurchaseHeader."Project Field 2"));
end;
KVSEDXPurchaseHeader.Modify(true);
OnBeforeProcessHeader(Record KVSEDX Purchase Header, XmlNamespaceManager, XmlElement, XmlNode, Boolean) :#
Summary: Integration event fired before processing a GS1 order response header (ORDRSP message). This event allows subscribers to perform custom preprocessing or validation before the standard header processing begins. Use this event to implement custom header-level business logic, party mappings, document type validations, or status checks.
[IntegrationEvent(true, false)]
local procedure OnBeforeProcessHeader(var KVSEDXPurchaseHeader: Record "KVSEDX Purchase Header"; var GS1XmlNamespaceManager: XmlNamespaceManager; var GS1XmlRootElement: XmlElement; var GS1OrderXmlNode: XmlNode; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX GS1 BMS ORDRSP IMP", 'OnBeforeProcessHeader', '', false, false)]
local procedure DoSomethingOnBeforeProcessHeader(var KVSEDXPurchaseHeader: Record "KVSEDX Purchase Header"; var GS1XmlNamespaceManager: XmlNamespaceManager; var GS1XmlRootElement: XmlElement; var GS1OrderXmlNode: XmlNode; var IsHandled: Boolean)
begin
end;
Parameters:
KVSEDXPurchaseHeader: The KVSEDX purchase header record being processedGS1XmlNamespaceManager: The XML namespace manager for GS1 document navigationGS1XmlRootElement: The root XML element of the order responseGS1OrderXmlNode: The current order response XML node being processedIsHandled: Set to true if the subscriber has handled the processing and wants to skip standard processing
OnAfterProcessHeader(Record KVSEDX Purchase Header, XmlNamespaceManager, XmlElement, XmlNode, Boolean) :#
Summary: Integration event fired after processing a GS1 order response header (ORDRSP message). This event allows subscribers to perform additional header-level business logic after the standard processing is complete. Use this event to implement custom validations, additional field mappings, external integrations, or workflow actions.
[IntegrationEvent(true, false)]
local procedure OnAfterProcessHeader(var KVSEDXPurchaseHeader: Record "KVSEDX Purchase Header"; var GS1XmlNamespaceManager: XmlNamespaceManager; var GS1XmlRootElement: XmlElement; var GS1OrderXmlNode: XmlNode; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX GS1 BMS ORDRSP IMP", 'OnAfterProcessHeader', '', false, false)]
local procedure DoSomethingOnAfterProcessHeader(var KVSEDXPurchaseHeader: Record "KVSEDX Purchase Header"; var GS1XmlNamespaceManager: XmlNamespaceManager; var GS1XmlRootElement: XmlElement; var GS1OrderXmlNode: XmlNode; var IsHandled: Boolean)
begin
end;
Parameters:
KVSEDXPurchaseHeader: The KVSEDX purchase header record that has been processedGS1XmlNamespaceManager: The XML namespace manager for GS1 document navigationGS1XmlRootElement: The root XML element of the order responseGS1OrderXmlNode: The processed order response XML nodeIsHandled: Set to true if custom post-processing logic has been applied
OnAfterAssignVariableLineData(Record KVSEDX Purchase Line, XmlNodeList, Boolean) :#
Summary: The OnAfterAssignVariableLineData event is fired when an avpList is processed in the order line. The "KVSEDX Purchase 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 KVSEDXPurchaseLine: Record "KVSEDX Purchase Line"; GS1AttributeValuePairXmlNodeList: XmlNodeList; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX GS1 BMS ORDRSP IMP", 'OnAfterAssignVariableLineData', '', false, false)]
local procedure DoSomethingOnAfterAssignVariableLineData(var KVSEDXPurchaseLine: Record "KVSEDX Purchase Line"; GS1AttributeValuePairXmlNodeList: XmlNodeList; var IsHandled: Boolean)
begin
end;
Parameters:
KVSEDXPurchaseLine: Current KVSEDX Purchase LineGS1AttributeValuePairXmlNodeList: Attribute Collection for this AttributeValuePairIsHandled: Set to true if custom logic has handled the processing
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':
KVSEDXPurchaseLine."Project Field 1" := CopyStr(GS1XmlNode.AsXmlElement().InnerText, 1, MaxStrLen(KVSEDXPurchaseLine."Project Field 1"));
'PROJ_DATA_2':
KVSEDXPurchaseLine."Project Field 2" := CopyStr(GS1XmlNode.AsXmlElement().InnerText, 1, MaxStrLen(KVSEDXPurchaseLine."Project Field 2"));
end;
KVSEDXPurchaseLine.Modify(true);
OnBeforeProcessLine(Record KVSEDX Purchase Line, XmlNamespaceManager, XmlNode, Boolean) :#
Summary: Integration event fired before processing a GS1 order response 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, price validations, or quantity confirmations.
[IntegrationEvent(true, false)]
local procedure OnBeforeProcessLine(var KVSEDXPurchaseLine: Record "KVSEDX Purchase Line"; var GS1XmlNamespaceManager: XmlNamespaceManager; var GS1LineXmlNode: XmlNode; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX GS1 BMS ORDRSP IMP", 'OnBeforeProcessLine', '', false, false)]
local procedure DoSomethingOnBeforeProcessLine(var KVSEDXPurchaseLine: Record "KVSEDX Purchase Line"; var GS1XmlNamespaceManager: XmlNamespaceManager; var GS1LineXmlNode: XmlNode; var IsHandled: Boolean)
begin
end;
Parameters:
KVSEDXPurchaseLine: The KVSEDX purchase line record being processedGS1XmlNamespaceManager: The XML namespace manager for GS1 document navigationGS1LineXmlNode: The current order response line XML node being processedIsHandled: Set to true if the subscriber has handled the processing and wants to skip standard processing
OnAfterProcessLine(Record KVSEDX Purchase Line, XmlNamespaceManager, XmlNode, Boolean) :#
Summary: Integration event fired after processing a GS1 order response line item. This event allows subscribers to perform additional line-level business logic after the standard processing is complete. Use this event to implement custom line validations, additional field mappings, external integrations, or workflow actions.
[IntegrationEvent(true, false)]
local procedure OnAfterProcessLine(var KVSEDXPurchaseLine: Record "KVSEDX Purchase Line"; var GS1XmlNamespaceManager: XmlNamespaceManager; var GS1LineXmlNode: XmlNode; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX GS1 BMS ORDRSP IMP", 'OnAfterProcessLine', '', false, false)]
local procedure DoSomethingOnAfterProcessLine(var KVSEDXPurchaseLine: Record "KVSEDX Purchase Line"; var GS1XmlNamespaceManager: XmlNamespaceManager; var GS1LineXmlNode: XmlNode; var IsHandled: Boolean)
begin
end;
Parameters:
KVSEDXPurchaseLine: The KVSEDX purchase line record that has been processedGS1XmlNamespaceManager: The XML namespace manager for GS1 document navigationGS1LineXmlNode: The processed order response line XML nodeIsHandled: Set to true if custom post-processing logic has been applied