User Role Sahip mi? X++

Mevcut User filanca role rahip mi Axapta 2012 kod örneği

1
2
3
4
5
6
7
8
9
10
11
12
13
14
     SecurityRole        role;
     SecurityUserRole    userRole;
     UserInfo            userInfo;
     ;


    select firstonly   role
    exists join userRole
    where role.RecId     == userRole.SecurityRole
          && userRole.User == curUserId()
          && role.Name == "OAY_SalesLineAdd";

    if(role.RecId)
        info("oldu");

Leave a Reply