Skip to content

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 Header
  • GS1XmlAttributeCollection: Attribute Collection for this AttributeValuePair
  • GS1AttributeValuePairXmlNode: Node with Value
  • IsHandled:

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) :#

[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;

OnAfterProcessHeader(Record KVSEDX Purchase Header, XmlNamespaceManager, XmlElement, XmlNode, Boolean) :#

[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;

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:

  • KVSEDXPurchaseHeader: Current KVSEDX Purchase Header
  • GS1XmlAttributeCollection: Attribute Collection for this AttributeValuePair
  • GS1AttributeValuePairXmlNode: Node with Value
  • IsHandled:

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) :#

[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;

OnAfterProcessLine(Record KVSEDX Purchase Line, XmlNamespaceManager, XmlNode, Boolean) :#

[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;