web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

X++ code to finding all the Duties related to specific Privileges in AX 2012

Community Member Profile Picture Community Member
static void findAllTheDutiesForSpecificPrivileges(Args _args)
{
        SecurityTask             securityTask;
        SecuritySubTask       securitySubTask;


        #define.SecurityTask("AbbreviationCodeImport_Import_RU") // your privileges name

        select firstOnly RecId from securityTask
                  where securityTask.AotName == #SecurityTask
                  && securityTask.Type == SecurityTaskType::Privilege;

          while select SecurityTask from securitySubTask
                    where securitySubTask.SecuritySubTask == securityTask.RecId
           {
                     select firstOnly * from securityTask
                                 where securityTask.RecId == securitySubTask.SecurityTask;
            info(strFmt(“%1,%2,%3″, securityTask.AOTNAME, securityTask.Name, securityTask.Type));
          }
 }

This was originally posted here.

Comments

*This post is locked for comments