Versions Compared

Key

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

Use this event to

Excerpt

Determine Modify the locations the user can useselect and which locations the "All" filter includes


Description

Mobile WMS uses the The Warehouse Employee table is used to determine which locations each Mobile User are allowed to use. This event allows changing this behavior to suit other requirements.

This event is first triggered in the GetReferenceData document type to generate the list of locations used in drop-down lists throughout the Mobile WMS application for the current userlogin.

The event is next triggered each time the user sets the location filter to "All" on any page in Mobile WMS. This means the user might be presented with the options "BLUE, WHITE, All" in the drop-down list of a location filter, but when the user selects "All" it might instead find records from locations BLUE and GREEN.You cannot change the sort order of the locations in the in the drop-down list. It is always the location marked as default in the warehouse employee table that is shown first followed by the additional locations sorted alphabetically

The _LocationFilter is used as a base filter and there might be additional requirements (e.g. Location."Require Shipment" = true) before the location is used in a given situation.

The MobDataSession codeunit can be used to retrieve request info to differentiate _LocationFilter based on user and/or document type.

You can use this event to:

  • Allow users to select other locations than configured in the warehouse employee table
  • Allow the location filter "All" to include a different set of locations than shown in the drop-down list

Tip

The MobDataSession codeunit can be used to retrieve request info to differentiate _LocationFilter based on user and/or document type.

The _LocationFilter is used as a base filter and there might be additional requirements (e.g. Location."Require Shipment" = true) before the location is used in a given situation.

Template

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Toolbox", 'OnBeforeGetLocationFilter', '', true, true)]
    local procedure OnBeforeGetLocationFilter(var _LocationFilter: Text; var _IsHandled: Boolean)
    begin
    end;

Example

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Toolbox", 'OnBeforeGetLocationFilter', '', true, true)]
    local procedure Ex01OnBeforeGetLocationFilter(var _LocationFilter: Text; var _IsHandled: Boolean)
    var
        MobSessionData: Codeunit"MOB SessionData";
    begin
        if (MobSessionData.GetDocumentType() = 'Lookup') and (MobSessionData.GetRegistrationType() = 'LocateItem') thenbegin
            _LocationFilter := '*';
            _IsHandled := true;
            exit;
        end;
        if MobSessionData.GetMobileUserID() = 'JOHN'thenbegin
            _LocationFilter := 'GREEN|BLUE';
            _IsHandled := true;
            exit;
        end;
    end;


Filter by label (Content by label)
showLabelsfalse
showSpacefalse
titleSee also
excerptTypesimple
excludeCurrenttrue
cqllabel = "bc" and label = "onbeforegetlocationfilter"

...