Use this event to
Modify response elements for Bin quantity.
Description
This event only affects locations with Location."Bin Mandatory" = true.
- The request is for an Items quantity in the warehouse
- The system search for Bin Contents of this Item
- When found the Quantity is derived from Bin field "Inventory"
- After each Bin Content record result, response can be modified using this event
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">
<Location>SILVER</Location>
<ItemNumber>1928-S</ItemNumber>
<LookupType>LocateItem</LookupType>
</requestData>
</request>
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Lookup", 'OnLookupOnLocateItem_OnAfterSetFromBinContent', '', true, true)]
procedure OnLookupOnLocateItem_OnAfterSetFromBinContent(_BinContent: Record "Bin Content"; var _LookupResponseElement: Record "MOB NS WhseInquery Element")
begin
end;
Example - Add a custom response element
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Lookup", 'OnLookupOnLocateItem_OnAfterSetFromBinContent', '', true, true)]
procedure MyOnLookupOnLocateItem_OnAfterSetFromBinContent(_BinContent: Record "Bin Content"; var _LookupResponseElement: Record "MOB NS WhseInquery Element")
begin
with _LookupResponseElement do begin
Set_DisplayLine1('Set from OnLocateItemOnAfterSetFromBinContent');
SetValue('WarehouseClassCode', 'OnLocateItemOnAfterSetFromBinContent Custom Tag for Warehouse Class Code ' + _BinContent."Warehouse Class Code");
end;
end;
Version History
Version | Changes |
---|---|
MOB5.00 | Introduced |