Showing posts with label Inquiry. Show all posts
Showing posts with label Inquiry. Show all posts

Monday, May 6, 2019

Users Security Roles Inquiry

Get all related security roles for users
below is a job and you can create query and form for visual view


static void FT_UserRoleInquiry(Args _args)
{
    UserInfo        _UserInfo;
    SecurityRole    _SecurityRole;
    SecurityUserRole    _SecurityUserRole;
   
   while select * from _UserInfo join _SecurityUserRole where _SecurityUserRole.User == _UserInfo.id join _SecurityRole where _SecurityRole.RecId == _SecurityUserRole.SecurityRole
    {
        info(strFmt("user %1 Security %2",_UserInfo.name,_SecurityRole.AotName    ));
    }
}