Use this event to
Modify response elements for Item Inventory quantity. (Location Not using Bins).
Description
This event only affects locations with Location."Bin Mandatory" = false.
One or more Item- and ItemVariant-records is read based on the lookup request. This event is called for each Item/Variant-combination to populate separate _LookupResponseElement's for each combination.
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>BLUE</Location>
<ItemNumber>1928-S</ItemNumber>
<LookupType>LocateItem</LookupType>
</requestData>
</request>
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Lookup", 'OnLookupOnLocateItem_OnAfterSetFromItem', '', true, true)]
local procedure OnLookupOnLocateItem_OnAfterSetFromItem(_Item: Record Item; _ItemVariant: Record "Item Variant"; var _LookupResponseElement: Record "MOB NS WhseInquery Element")
begin
end;
Example 01 - Add a custom response element
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Lookup", 'OnLookupOnLocateItem_OnAfterSetFromItem', '', true, true)]
local procedure My01OnLookupOnLocateItem_OnAfterSetFromItem(_Item: Record Item; _ItemVariant: Record "Item Variant"; var _LookupResponseElement: Record "MOB NS WhseInquery Element")
begin
_LookupResponseElement.Set_DisplayLine1('Set from OnLocateItemOnAfterSetFromItem');
_LookupResponseElement.SetValue('WarehouseClassCode', 'OnLocateItemOnAfterSetFromItem Custom Tag for Warehouse Class Code ' + _Item."Warehouse Class Code");
end;
Example 02 - Add a custom response element as HTML
// WhseInquiry-response as html view (requires Android 1.4.3 or newer)
// NOTE: only first LookupResponse is displayed, do NOT use for Inquiries that may return multiple LookupResponse-elements)
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Lookup", 'OnLookupOnLocateItem_OnAfterSetFromItem', '', true, true)]
local procedure My02OnLookupOnLocateItem_OnAfterSetFromItem(_Item: Record Item; _ItemVariant: Record "Item Variant"; var _LookupResponseElement: Record "MOB NS WhseInquery Element")
begin
_LookupResponseElement.Set_html(
'<b><font color="blue">' + _LookupResponseElement.Get_DisplayLine1() + '</font></b>' +
'<br>' + _LookupResponseElement.Get_DisplayLine2() +
'<br>' + 'Qty: ' + _LookupResponseElement.Get_Quantity());
end;
More examples
-
Case: Display breakbulk information when posting breakbulk lines automatically — Display addtional breakbulk information during picks, when breakbulk lines is otherwise hidden due to "Mobile WMS Setup"."Post breakbulk lines automatically".
-
-
How-to: Modify DisplayLines — Additional text displayed on a List.
-
-
How-to: Modify HeaderLabel and HeaderValue — Modify text in the top of Order Lines
-
How-to: Register Quantity By Multiplication (enableMultiplier) — You want to scan the Quantity multiplier and then manually type the quantity to automatically calculate the total quantity to register.
The multiplers are defined by using the "Qty. per Unit of Measure" from the barcode "Unit of Measure" in the "Item Reference". See Barcode Quantity (enableMultiplier) Example: Box (5) x 10 = 50 Pcs
-
How-to: Register Quantity By Scan — You want to scan the Quantity . Either one piece or have the system calculate quantity based on "Item Cross Reference".
-
How-to: Search - Add new HeaderField to existing SearchType — Add a new custom HeaderField to the existing "magnifying glass" SearchType 'ItemSearch' and show a simple search response.
-
How-to: Sorting of Order Lines — Examples of sorting Order Lines.
-
How-to: Sorting of Orders — Examples of sorting Order list
Version History
Version | Changes |
---|---|
MOB5.00 | Introduced |
MOB5.16 | New support for Set_html |