Friday, October 30, 2015

AX 2012 - How to know if an AX User has the "Execute business operations in CIL" option enable ?

Hi All

Seems an easy question, but today I spent some time to get this answer.

The answer is :

    If ( appl.parmExecuteBusinessOperationsWithCLR() )
        info ("Enable");
    else
        info ("Disable");

Also, take a look to this link https://msdn.microsoft.com/en-us/library/hh528509.aspx

Stay Tuned!
 

Thursday, October 29, 2015

Retrieve the Query name linked to a View

Hi All

Below the code in order to retrieve the query name that defines a View.
    #AOT
    #Properties

    TreeNode          treeNode;
    QueryName         QueryName;

    treeNode = TreeNode::findNode(#ViewsPath+'\\'+ 'ViewName');
    QueryName = findProperty(treeNode.AOTgetProperties(), #PropertyQuery);
   
    info ( QueryName );

That’s it!