...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Excerpt |
---|
Implement custom document locking scheme or display messages at mobile device. |
WORK IN PROGRESS
xXXXX
...
...
Info | ||
---|---|---|
| ||
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). |
...
registrationtypes). |
Use this event to
Excerpt |
---|
Implement custom document locking scheme or display messages at 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.
Also, since Since this event is consistently called before planned documents are displayed at the mobile deviceMobile Device, you may also use the event to display confirmation messages at the mobile device when such documents are opened.
See also: OnUnlockOrder_OnBeforeUnlockOrder
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB User ManagementMOB WMS Order Locking", 'OnLoginOnLockOrder_OnAfterLoginOnBeforeLockOrder', '', true true, true true)]
local procedure OnLogin OnLockOrder_OnAfterLoginOnBeforeLockOrder(_MobDocQueueMobDocumentQueue: Record "MOB Document Queue"; var _RequestValues: Record "MOB Document Queue"MOB NS Request Element"; var _IsHandled: Boolean)
begin
// Implement custom business logic here
end;
Example
...
1
// [Example 01] Your own custom locking implementation: Suspend all order locking for Pick lines
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB User ManagementMOB WMS Order Locking", 'OnLoginOnLockOrder_OnAfterLoginOnBeforeLockOrder', '', true true, true true)]
local procedure OnLogin My01OnLockOrder_OnAfterLoginOnBeforeLockOrder(_MobDocQueueMobDocumentQueue: Record "MOB Doc Queue")
var
MobUserMOB Document Queue"; var _RequestValues: Record "MOB UserMOB NS Request Element";
var WarehouseEmployee_IsHandled: Record "Warehouse Employee";
Boolean)
begin
if with _LookupResponseElement do begin
MobUser.Get(_MobDocQueue."Mobile User ID");
WarehouseEmployee.SetRange("User ID", MobUser."User ID");
if WarehouseEmployee.IsEmpty() then
Error('You Shall Not Pass!!!!');
end;
_RequestValues.GetValue('Type') = 'Pick' then begin
_IsHandled := true;
exit;
end;
end;
Example 2
// [Example 02] Confirmation message when attempting specific lock type
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Order Locking", 'OnLockOrder_OnBeforeLockOrder', '', true, true)]
local procedure My02OnLockOrder_OnBeforeLockOrder(_MobDocumentQueue: Record "MOB Document Queue"; var _RequestValues: Record "MOB NS Request Element"; var _IsHandled: Boolean)
var
MobToolbox: Codeunit "MOB Toolbox";
begin
if _RequestValues.GetValue('Type') = 'Pick' then
MobToolbox.ErrorIfNotConfirm(_RequestValues, 'This is a confirmation message OnGetPickOrderLines...');
end;
Version History
Version | Changes |
---|---|
MOB5.21 | Introduced |
...