[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Pick", 'OnGetPickOrders_OnAfterSetFromWarehouseActivityHeader', '', true, true)]
procedure OnGetPickOrders_OnAfterSetFromWarehouseActivityHeader(_WhseActHeader: Record "Warehouse Activity Header"; var _BaseOrderElement: Record "MOB Ns BaseDataModel Element")
var
MobSetup: Record "MOB Setup";
begin
MobSetup.Get();
if (MobSetup."Enable Tote Picking") and (_WhseActHeader.Type = _WhseActHeader.Type::Pick) then
_BaseOrderElement.Set_TotePicking(TotePickingIsEnabledByLocation(_WhseActHeader."Location Code"));
end;
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Pick", 'OnGetPickOrderLines_OnAfterSetFromWarehouseActivityLine', '', true, true)]
procedure OnGetPickOrderLines_OnAfterSetFromWarehouseActivityLine(_WhseActLineTake: Record "Warehouse Activity Line"; var _BaseOrderLineElement: Record "MOB Ns BaseDataModel Element")
var
MobSetup: Record "MOB Setup";
begin
MobSetup.Get();
if (MobSetup."Enable Tote Picking") and (_WhseActLineTake."Activity Type" = _WhseActLineTake."Activity Type"::Pick) then
if not TotePickingIsEnabledByLocation(_WhseActLineTake."Location Code") then begin
// revert Tote Picking flags originally written to the BaseOrderElement by standard Mobile WMS code
_BaseOrderLineElement.Set_DisplayLine4('');
_BaseOrderLineElement.Set_Destination('');
end;
end;
procedure TotePickingIsEnabledByLocation(_LocationCode: Code[10]) _TotePickingIsEnabled: Boolean
begin
_TotePickingIsEnabled := _LocationCode <> 'WHITE';
exit(_TotePickingIsEnabled);
end;