Use this event to
Excerpt |
---|
Filter Bin Content to be included during Bulk Move 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 LookupAdhoc Registr.", 'OnLookupOnBinContentOnPostAdhocRegistrationOnBulkMove_OnSetFilterBinContent', '', true, true)]
localprocedure OnLookupOnBinContent OnPostAdhocRegistrationOnBulkMove_OnSetFilterBinContent(var _RequestValues: Record"MOB NS Request Element"; var _BinContent: Record"Bin Content")
begin
end;
Example
...
: Implement at PackageNumber filter in BulkMove
//
// [Example 01] Include all Bin Content (remove "Quantity<>0" condition)] Implement a PackageNumber filter in BulkMove
//
//
// BulkMove
//
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS LookupReference Data", 'OnLookupOnBinContentOnGetReferenceData_OnSetFilterBinContentOnAddHeaderConfigurations', '', true, true)]
localprocedure My01OnLookupOnBinContent My02OnGetReferenceData_OnSetFilterBinContentOnAddHeaderConfigurations(var _RequestValuesHeaderFields: Record"MOB NS Request HeaderField Element"; var _BinContent: Record "Bin Content"))
var
MobTrackingSetup: Record"MOB Tracking Setup";
MobToolbox: Codeunit"MOB Toolbox";
begin
// Add a field to an existing ConfigurationKey from standard Mobile WMS
_BinContentHeaderFields.SetRangeInitConfigurationKey_BulkMoveHeader(Quantity);// Include all Bin Content records regardless of Quantity on hand
end;
Example 02: Combine OnSetFilter and OnInclude events to display all fixed bins but floating bins only with inventory
// [Example 02]: Combination of OnSetFilter and OnInclude -events. Display all fixed bins, but only floating bins with inventory
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Lookup", 'OnLookupOnBinContent_OnSetFilterBinContent', '', true, true)]
localprocedure My02OnLookupOnBinContent_OnSetFilterBinContent(var _RequestValues: Record "MOB NS Request Element"; var _BinContent: Record "Bin Content")
begin
// 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);
_BinContentHeaderFields.SetRangeSave(Quantity);// Include all Bin Content records regardless of Quantity on hand
end;
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS LookupAdhoc Registr.", 'OnLookupOnBinContentOnPostAdhocRegistrationOnBulkMove_OnIncludeBinContentOnSetFilterBinContent', '', true, true)]
localprocedure My02OnLookupOnBinContent My02OnPostAdhocRegistrationOnBulkMove_OnIncludeBinContentOnSetFilterBinContent(var _RequestValues: Record"MOB NS Request Element"; var _BinContent: Record"Bin Content"; var _IncludeInLookup: Boolean))
var
MobTrackingSetup: Record"MOB Tracking Setup";
begin
_IncludeInLookup := _IncludeInLookup and ((_BinContent.Quantity <> 0) or _BinContent.Fixed); // Exclude floating bins with no inventoryMobTrackingSetup.CopyTrackingFromRequestValues(_RequestValues); // Support for all Item Tracking fields (LotNumber, SerialNumber, PackageNumber)
MobTrackingSetup.SetTrackingFilterForBinContentIfNotBlank(_BinContent);
end;
Filter by label (Content by label) showLabels false showSpace false sort title title More examples excerptType simple cql label = "bc" and label = "lookupadhoc" and label = "bincontent " and label = "onsetfilter" and label = "example"
Version History
Version | Changes |
---|---|
MOB5. |
43 | Introduced |