This post is machine-translated. The original post in german language can be found here.

AX 2012: Determine whether a form is a list page

With the following piece of code you can determine whether a form is a list page.

static void isFormListPage(Args _args)
{
    TreeNode treeNode;
    str formTemplateProperty;
    #Properties;

    treeNode = TreeNode::findNode(@"\\Forms\\CustTableListPage");

    formTemplateProperty = global::findProperty(treeNode.AOTgetProperties(), #PropertyFormTemplate);

    if(formTemplateProperty == #PropertyValueListPage)
    {
        warning("Form is ListPage");
    }
}

If anyone knows a better/more elegant solution, so I would be happy, if he or she contributes via the comment function.

These post applies to following version:
Dynamics AX 2012

 
 

 

 
 
 
Posts of the actual month
November 2024
MoTuWeThFrSaSu
 123
45678910
11121314151617
18192021222324
252627282930 
 
© 2006-2024 Heinz Schweda | Imprint | Contact | German version | Mobile version
In order to provide you with better service, this site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.