This event is for the locking scheme that is implemented for planned documents at the Mobile Device (when users are displaying and possibly scanning documents).
Do not confuse with database locks (that is set during processing/posting of the specific documenttypes/registrationtypes).
Use this event to
Implement custom document locking scheme for the Mobile Device.
Description
Using this event you may implement a custom planned document locking scheme. These are the locks that are set for documents at the Mobile Device that will prevent other users from handling same documents at the same time.
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Order Locking", 'OnUnlockOrder_OnBeforeUnlockOrder', '', true, true)]
local procedure OnUnlockOrder_OnBeforeUnlockOrder(_MobDocumentQueue: Record "MOB Document Queue"; var _RequestValues: Record "MOB NS Request Element"; var _IsHandled: Boolean)
begin
// Implement custom business logic here
end;
Example
// [Example] Your own custom locking implementation: Suspend all order unlocking for Pick lines (needs similar OnLockOrder_OnBeforeLockOrder event)
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Order Locking", 'OnUnlockOrder_OnBeforeUnlockOrder', '', true, true)]
local procedure MyOnUnlockOrder_OnBeforeUnlockOrder(_MobDocumentQueue: Record "MOB Document Queue"; var _RequestValues: Record "MOB NS Request Element"; var _IsHandled: Boolean)
begin
if _RequestValues.GetValue('Type') = 'Pick' then begin
_IsHandled := true;
exit;
end;
end;
Version History
Version | Changes |
---|---|
MOB5.21 | Introduced |