Use this event to
Change sort order for <LookupResponse>-elements at the mobile device.
See also: Filter or Sort Orders
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);
end;
Version History
Version | Changes |
---|---|
MOB5.22 | Introduced |