Versions Compared

Key

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

Use this event to

Excerpt

Filter Bin Content to be included during Bulk Move (ie. when implementing new HeaderFields (ie. Item Tracking fields)

Description

This event affects all locations with Location."Bin Mandatory" = true.

...

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Adhoc Registr.", 'OnPostAdhocRegistrationOnBulkMove_OnSetFilterBinContent', '', true, true)]
    localprocedure OnPostAdhocRegistrationOnBulkMove_OnSetFilterBinContent(var _RequestValues: Record"MOB NS Request Element"; var _BinContent: Record"Bin Content")
    begin
    end;

Example: Implement at PackageNumber filter at LookupBinContent and BulkMove

...


    //
    // LookupBinContent
    //

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Reference Data", 'OnGetReferenceData_OnAddHeaderConfigurations', '', true, true)]
    localprocedure My01OnGetReferenceData_OnAddHeaderConfigurations(var _HeaderFields: Record"MOB HeaderField Element")
    var
        MobTrackingSetup: Record"MOB Tracking Setup";
        MobToolbox: Codeunit"MOB Toolbox";
    begin
        // Add a field to an existing ConfigurationKey from standard Mobile WMS
        _HeaderFields.InitConfigurationKey_BinContentCfgHeader();

        // Id 10000 = display after current header fields (id 10 to 30)
        _HeaderFields.Create_TextField(10000, 'PackageNumber', false);    // false = No AutoSave for better performance when creating field (must call Save manually later)
        _HeaderFields.Set_label(MobTrackingSetup.FieldCaption("Package No.") + ':');
        _HeaderFields.Set_eanAi(MobToolbox.GetPackageNoGS1Ai());
        _HeaderFields.Set_length(50);
        _HeaderFields.Set_optional(true);
        _HeaderFields.Save();
    end;

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Lookup", 'OnLookupOnBinContent_OnSetFilterBinContent', '', true, true)]
    localprocedure My01OnLookupOnBinContent_OnSetFilterBinContent(var _RequestValues: Record"MOB NS Request Element"; var _BinContent: Record"Bin Content")
    var
        MobTrackingSetup: Record"MOB Tracking Setup";
    begin
        MobTrackingSetup.CopyTrackingFromRequestValues(_RequestValues); // Support for all Item Tracking fields (LotNumber, SerialNumber, PackageNumber)
        MobTrackingSetup.SetTrackingFilterForBinContentIfNotBlank(_BinContent);
    end;

    //
    // BulkMove
    //

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Reference Data", 'OnGetReferenceData_OnAddHeaderConfigurations', '', true, true)]
    localprocedure My02OnGetReferenceData_OnAddHeaderConfigurations(var _HeaderFields: Record"MOB HeaderField Element")
    var
        MobTrackingSetup: Record"MOB Tracking Setup";
        MobToolbox: Codeunit"MOB Toolbox";
    begin
        // Add a field to an existing ConfigurationKey from standard Mobile WMS
        _HeaderFields.InitConfigurationKey_BulkMoveHeader();

        // Id 10000 = display after current header fields (id 10 to 30)
        _HeaderFields.Create_TextField(10000, 'PackageNumber', false);    // false = No AutoSave for better performance when creating field (must call Save manually later)
        _HeaderFields.Set_label(MobTrackingSetup.FieldCaption("Package No.") + ':');
        _HeaderFields.Set_eanAi(MobToolbox.GetPackageNoGS1Ai());
        _HeaderFields.Set_length(50);
        _HeaderFields.Set_optional(true);
        _HeaderFields.Save();
    end;

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Adhoc Registr.", 'OnPostAdhocRegistrationOnBulkMove_OnSetFilterBinContent', '', true, true)]
    localprocedure My02OnPostAdhocRegistrationOnBulkMove_OnSetFilterBinContent(var _RequestValues: Record"MOB NS Request Element"; var _BinContent: Record"Bin Content")
    var
        MobTrackingSetup: Record"MOB Tracking Setup";
    begin
        MobTrackingSetup.CopyTrackingFromRequestValues(_RequestValues); // Support for all Item Tracking fields (LotNumber, SerialNumber, PackageNumber)
        MobTrackingSetup.SetTrackingFilterForBinContentIfNotBlank(_BinContent);
    end;


Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
titleMore examples
excerptTypesimple
cqllabel = "bc" and label = "adhoc" and label = "onsetfilter" and label = "example"

...