Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Use this event to

Implement custom document locking scheme or display messages at mobile device.

WORK IN PROGRESS


xXXXX
XXXXX


Here you have the possibility to implement a custom 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. 
Do not confuse with database locks (that is set only during processing/posting of the specific documenttypes/registrationcodes).

Also,Since this event is generally called before any document is displayed at the mobile device, you may use the event to display confirmation messages at the mobile device when documents are opened.


Template

[EventSubscriber(ObjectType::CodeunitCodeunit::"MOB User Management", 'OnLogin_OnAfterLogin''', true, true)]
procedure OnLogin_OnAfterLogin(_MobDocQueue: Record "MOB Document Queue")
begin
end;

Example: Add custom Login Validation Logic

[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB User Management", 'OnLogin_OnAfterLogin', '', true, true)]
procedure OnLogin_OnAfterLogin(_MobDocQueue: Record "MOB Doc Queue")
var
     MobUser: Record "MOB User";
     WarehouseEmployee: Record "Warehouse Employee";
begin
     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;
end;

Version History

VersionChanges
MOB5.13Introduced
  • No labels