Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Use this event to

...

Info

This event is for the locking scheme that is implemented for planned documents at the Mobile Device (when users are displaying and possible scanning documents)
Do not confuse with database locks(that is set during processing/posting of the specific documenttypes/registrationcodes).

...

Also, since this event is consistently called before planned documents are displayed at the mobile device, you may use the event to display confirmation messages at the mobile device when such 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.21Introduced

...