Use this event to
Implement custom document locking scheme or display messages at mobile deviceHere you have the possibility to implement custom login validation logic or handle setup of data, for instance Printer Selections according to device id.
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"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
Version | Changes |
---|---|
MOB5.13 | Introduced |