Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info
titleReplaced by new events in MOB5.15

Use the OnGetReferenceData_OnAddRegistrationCollectorConfigurations event instead if you are using MOB5.15 or newer.


Use this event to

Excerpt

Add new ListData (DataTable) to ReferenceData. 

...

Input is XmlReponse with standard Mobile WMS' ListData already written to the Xml.  Addtional elements can be added directly to the response.


Template

...

[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Reference Data", 'OnGetReferenceData_OnAfterAddListDataAsXml', '', true, true)]
procedure OnGetReferenceData_OnAfterAddListDataAsXml(var _XmlResponseData: XmlNode)
begin
     // Add ListData (DataTable) here...
end;

Example

...

[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Reference Data", 'OnGetReferenceData_OnAfterAddListDataAsXml', '', true, true)]
procedure OnGetReferenceData_OnAfterAddListDataAsXml(var _XmlResponseData: XmlNode)
begin
     AddShipmentMethods(_XmlResponseData);
end;


local procedure AddShipmentMethods(var XMLResponseData: XmlNode);
var
     ShipmentMethod: Record "Shipment Method";
     MobXmlMgt: Codeunit "MOB XML Management";
     XmlCreatedNode: XmlNode;
     XmlShipmentMethodNode: XmlNode;
     SHIPMENT_METHOD_TABLE_Txt: Label 'ShipmentMethod', Locked = true;
begin
     // Add all shipment method codes
     ShipmentMethod.SetFilter(Code, '<>%1', '');
     if ShipmentMethod.FindSet() then
     repeat
          // Add the <ShipmentMethod> element
          MobXMLMgt.AddElement(XMLResponseData, SHIPMENT_METHOD_TABLE_Txt, '', '', XmlShipmentMethodNode);


          // Add the <Code> element
          MobXMLMgt.AddElement(XmlShipmentMethodNode, 'Code', ShipmentMethod.Code, '', XmlCreatedNode);

     until ShipmentMethod.Next() = 0;
end;

Version History

...

VersionChanges
MOB5.00Introduced

...