X++:
static void Job17(Args _args)
{
UserInfo userInfo;
SecurityUserRole secUserRole;
SecurityRole secRole;
;
while select Id from userInfo
where userInfo.Id like 'K*'
join RecId from secUserRole
where secUserRole.User == userInfo.Id
join secRole
where secRole.RecId == secUserRole.SecurityRole
{
info(strFmt("%1 - %2", userInfo.Id, secRole.Name));
}
}