Use this event to
...
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Lookup", 'OnLookupOnPostShipment_OnSetFilterWarehouseShipment', '', true, true)]
local procedure OnLookupOnPostShipment_OnSetFilterWarehouseShipment(var _RequestValues: Record "MOB NS Request Element"; var _WhseShipmentHeader: Record "Warehouse Shipment Header"; var _WhseShipmentLine: Record "Warehouse Shipment Line")
begin
end;
Example 1
// [Example 01] Do not allow mobile user to handle shipments lines over a certain weight when no special equipment is used (but still ship remaining lines)
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Lookup", 'OnLookupOnPostShipment_OnSetFilterWarehouseShipment', '', true, true)]
local procedure My01OnLookupOnPostShipment_OnSetFilterWarehouseShipment(var _RequestValues: Record "MOB NS Request Element"; var _WhseShipmentHeader: Record "Warehouse Shipment Header"; var _WhseShipmentLine: Record "Warehouse Shipment Line")
var
MyCustomEquipmentText: Text;
begin
MyCustomEquipmentText := _RequestValues.GetValue('MyCustomEquipmentField'); // New custom field in headerconfiguration used by the lookup page
if MyCustomEquipmentText = 'No special equipment' then
_WhseShipmentLine.SetRange(Weight, 0, 25);
end;
Example 2
// [Example 02] Exclude Warehouse Shipments that has comments
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Lookup", 'OnLookupOnPostShipment_OnSetFilterWarehouseShipment', '', true, true)]
local procedure My02OnLookupOnPostShipment_OnSetFilterWarehouseShipment(var _RequestValues: Record "MOB NS Request Element"; var _WhseShipmentHeader: Record "Warehouse Shipment Header"; var _WhseShipmentLine: Record "Warehouse Shipment Line")
begin
_WhseShipmentHeader.SetRange(Comment, false);
end;
Filter by label (Content by label) showLabels false showSpace false sort title title More examples excerptType simple cql label = "bc" and label = "lookup" and label = "onpostshipment" and label = "onsetfilter" and label = "example"
...