Use this event to
Excerpt |
---|
Change sort order for <LookupResponse>-elements at the mobile device. |
See also: How-to: Sorting of Orders (OnAfterSetFrom-events)
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Lookup", 'OnLookupOnAnyLookupType_OnAfterSetCurrentKey', '', true, true)]
local procedure OnLookupOnAnyLookupType_OnAfterSetCurrentKey(_LookupType: Text; var _LookupResponseElementView: Record "MOB NS WhseInquery Element")
begin
end;
Example
// [Example] Sort response by Item.Name (="DisplayLine2" in response)
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Lookup", 'OnLookupOnAnyLookupType_OnAfterSetCurrentKey', '', true, true)]
local procedure MyOnLookupOnAnyLookupType_OnAfterSetCurrentKey(_LookupType: Text; var _LookupResponseElementView: Record "MOB NS WhseInquery Element")
var
MobWmsLookup: Codeunit "MOB WMS Lookup";
begin
if _LookupType = MobWmsLookup."CONST::BinContent"() then
_LookupResponseElementView.SetCurrentKey(DisplayLine2); // DisplayLine2 is Item.Name in this LookupBinContent reponse
end;
Version History
Version | Changes |
---|---|
MOB5.22 | Introduced |