Versions Compared

Key

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


Excerpt
Set custom values On "PostShipment" for <LookupResponse>-elements.



Sample request

...

<request name="Lookup" created="2019-08-14T10:39:46+02:00" xmlns="http://schemas.microsoft.com/Dynamics/Mobile/2007/04/Documents/Request">
     <requestData name="Lookup">
          <LocationFilter>WHITE</LocationFilter>
          <ShipmentNoFilter>SH000004</ShipmentNoFilter>
          <LookupType>PostShipment</LookupType>
     </requestData>
</request>

Template

...

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS LookupMOB WMS Lookup", 'OnLookupOnPostShipment_OnAfterSetFromWarehouseShipmentHeader''', true true, true true)]
    procedure OnLookupOnPostShipment_OnAfterSetFromWarehouseShipmentHeader(_WhseShipmentHeader: Record "Warehouse Shipment HeaderWarehouse Shipment Header"; var _LookupResponseElement: Record "MOB NS WhseInquery ElementMOB NS WhseInquery Element")
    begin
    end;

Example

...

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS LookupMOB WMS Lookup", 'OnLookupOnPostShipment_OnAfterSetFromWarehouseShipmentHeader', '', true true, true true)]
    procedure OnLookupOnPostShipment MyOnLookupOnPostShipment_OnAfterSetFromWarehouseShipmentHeader(_WhseShipmentHeader: Record "Warehouse Shipment HeaderWarehouse Shipment Header"; var _LookupResponseElement: Record "MOB NS WhseInquery ElementMOB NS WhseInquery Element")
    begin
     with        with _LookupResponseElement do begin
          Set            Set_DisplayLine1('Set from OnPostShipmentOnAfterSetFromWhseShipmentHeaderSet from OnPostShipmentOnAfterSetFromWhseShipmentHeader');
          SetValue            SetValue('ShippingAgentCode''OnPostShipmentOnAfterSetFromWhseShipmentHeader Custom Tag for Shipping Agent Code OnPostShipmentOnAfterSetFromWhseShipmentHeader Custom Tag for Shipping Agent Code ' + _WhseShipmentHeader."Shipping Agent CodeShipping Agent Code");
     end        end;
    end;

Version History

...

VersionChanges
MOB5.00Introduced

...