Turn off CIL exectution for user from code in AX 2012

If you cannot open the user options from AX 2012 for some reason, but you have to uncheck “Execute Buisness operations in CIL” you can use this job :

static void SR_CreateProjects_subProjects(Args _args)
{
    #LOCALMACRO.FLAG_ExecBusinessOpsWithInterpreter (1 << 10) #ENDMACRO
     UserInfo userinfo;
     ttsBegin;
         select forUpdate userinfo where userinfo.id == 'Admin';
         userInfo.DebugInfo = userInfo.DebugInfo | #FLAG_ExecBusinessOpsWithInterpreter;
         userinfo.update();
     ttsCommit;
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s