Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Info | ||
---|---|---|
| ||
Extension version MOB5.38 |
Case
Excerpt |
---|
Filter Lookup Bin Content for a specific Serial No. |
Proposed solution
The Warehouse worker wants to be able to do additional item tracking filtering on Bin Content results.
We can modify the existing "Bin Content" Header by adding a new text field called "Serial No."
The user can now, optionally, enter a value to filter the lookup results for a specific Serial No.
Step 1
Use event OnGetReferenceData_OnAddHeaderConfigurations to modify the "Bin Content" header by adding a new text field to use for filtering on Serial No.
// Step 1
// Modify the "Bin Content" header by adding a new text field to use for filtering on Serial No.
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Reference Data", 'OnGetReferenceData_OnAddHeaderConfigurations', '', true, true)]
localprocedure OnGetReferenceData_OnAddHeaderConfigurations(var _HeaderFields: Record "MOB HeaderField Element")
begin
_HeaderFields.InitConfigurationKey('BinContentCfgHeader');
_HeaderFields.Create_TextField_SerialNumber(35, 'SerialFilter', 'Serial No.:');
_HeaderFields.Set_optional(true);
end;
Step 2
Use event OnLookupOnBinContent_OnSetFilterBinContent to filter for Serial No. , using the value from Header field
// Step 2
// Use the header field from Step 1, to filter for Serial No.
[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
_BinContent.SetFilter("Serial No. Filter", _RequestValues.GetValue('SerialFilter'));
end;
Content by Label | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Note "Serial No." field has been added to the Bin Content "header"