Hi All,
How to get current user roles via X++.
I have tried below code but this shows one role only.But i have three roles.
SecurityRole role;
SecurityUserRole userRole;
UserInfo userInfo;
;
while select firstonly role
exists join userRole
where role.RecId == userRole.SecurityRole
&& userRole.User == curUserId()
{
info(strFmt("%1 - %2", role.Name,curUserId()));
}
Please suggest.
*This post is locked for comments
I have the same question (0)