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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Cascading parameter is not working using UI Builder

(0) ShareShare
ReportReport
Posted on by

Hi Everyone,

Need some help in cascading parameter report.

I have created cascading report using AssetTable, purpose for this report is that upon selection of Fixet Asset Group in first parameter the Fixed Asset Number (2nd parameter ) should be shown data accordingly.

But i am unable to achieve this when i select Fixet Asset Group it shows "The grid is empty".

Can someone figure it out as i am searching for this issue from last two weeks.

may be some issue with the code.

Please see the image :

Cascading-FA_2D00_ERROR.jpg

Note : i have used : RDP,CONTRACT AND UI BUILDER.

thank you

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rohin Profile Picture
    4,624 on at

    I would first try to debug code that i am assuming you have written in UIBuilder class for Override lookup, Please see this

    If it not resolve , show us your code. 

    Secondly , if your code would fine, try to remove Caches ( tools > caches) and run CIL , deploy the report etc..

  • Community Member Profile Picture
    on at

    Thank you for your reply and advance thank you for reading this long code :).

    FYI i have recently started development in X++.

    UI Builder Class :

    class EA_CascadingUI extends SysOperationAutomaticUIBuilder

    {

       DialogField dialogAssetGroupId;

       DialogField dialogAssetId;

       EA_CascadingContract contract;

    }

    public void build()

    {

       Dialog      dialogLocal = this.dialog();

       contract = this.dataContractObject();

       dialogLocal.addGroup("Computers");

       this.addDialogField(methodStr(EA_CascadingContract,parmassetGroupid), contract);

       this.addDialogField(methodStr(EA_CascadingContract,parmassetid), contract);

    }

    public boolean custGroupModified(FormStringControl _control)

    {

       dialogAssetGroupId.value(_control.valueStr());

      dialogAssetId.value('');

       return true;

    }

    public void getFromDialog()

    {

       //EA_CascadingContract contract;

       contract = this.dataContractObject();

       super();

    }

    public void initializeFields()

    {

      // EA_CascadingContract contract;

       contract = this.dataContractObject();

    }

    public void lookupAssetId(FormStringControl _control)

    {

       Query query = new Query();

       SysTableLookup sysTablelookup;

       sysTablelookup =SysTableLookup::newParameters(tableNum(AssetTable),_control);

       sysTablelookup.addLookupfield(fieldnum(AssetTable,AssetId));

       // sysTablelookup.addLookupfield(fieldNum(AssetTable,AssetId));

       query.addDataSource(tableNum(AssetTable));

       query.dataSourceTable(tableNum(AssetTable)).addRange(fieldNum(AssetTable, AssetId)).value(dialogAssetGroupId.value());

       sysTablelookup.parmQuery(query);

       sysTablelookup.performFormLookup();

    }

    public void lookupCondition(FormStringControl _control)

    {

       Query query = new Query();

       SysTableLookup sysTablelookup;

           AssetConditionId condition1 ;

       sysTablelookup =SysTableLookup::newParameters(tableNum(AssetTable),_control);

       sysTablelookup.addLookupfield(fieldNum(AssetTable,AssetGroup));

      //  sysTablelookup.addLookupfield(fieldnum(AssetTable,Name));

      // sysTablelookup.addLookupfield(fieldNum(AssetTable,AssetGroup));

       query.addDataSource(tableNum(AssetTable));

       sysTablelookup.parmQuery(query);

       sysTablelookup.performFormLookup();

    }

    public void postBuild()

    {

       super();

       // From binding info, get the dialog field for racecode attribute and add button

       dialogAssetGroupId = this.bindInfo().getDialogField(

                            this.dataContractObject(),

                            methodStr(EA_CascadingContract,parmassetGroupid));

       if (dialogAssetGroupId)

       {

        dialogAssetGroupId.lookupButton(2);

       }

       // register override method for lookup cust Group

       dialogAssetGroupId.registerOverrideMethod(methodStr(FormStringControl, lookup), methodStr(EA_CascadingUI, lookupCondition), this);

       // register override method for modified

       dialogAssetGroupId.registerOverrideMethod(methodStr(FormStringControl, modified), methodStr(EA_CascadingUI, custGroupModified), this);

       //binding info for customer drop down

       dialogAssetId = this.bindInfo().getDialogField(

                            this.dataContractObject(),

                            methodStr(EA_CascadingContract,parmAssetId));

       // register override method for lookup customer

       dialogAssetId.registerOverrideMethod(methodStr(FormStringControl, lookup), methodStr(EA_CascadingUI, lookupAssetId), this);

       if (dialogAssetId)

       {

           dialogAssetId.lookupButton(2);

       }

    }

    public void postRun()

    {

       super();

    }

  • Verified answer
    Rohin Profile Picture
    4,624 on at

    Hi,

    I just changed your piece of code , please see below changes:

    This is yours lookupAssetId which i changed to lookupAssetGroup (a meaningful method name)
    public void lookupAssetGroup(FormStringControl _control)
    {
       Query query = new Query();
       SysTableLookup sysTablelookup;
       sysTablelookup =SysTableLookup::newParameters(tableNum(AssetTable),_control);
       sysTablelookup.addLookupfield(fieldnum(AssetTable,AssetGroupId));
       // sysTablelookup.addLookupfield(fieldNum(AssetTable,AssetId));
       query.addDataSource(tableNum(AssetTable));
       
       sysTablelookup.parmQuery(query);
       sysTablelookup.performFormLookup();
    }
    This is yours lookupCondition which i changed to lookupAssetId name( a meaningful name)
    public void lookupAssetId(FormStringControl _control)
    {
       Query query = new Query();
       SysTableLookup sysTablelookup;
           AssetConditionId condition1 ;
       sysTablelookup =SysTableLookup::newParameters(tableNum(AssetTable),_control);
       sysTablelookup.addLookupfield(fieldNum(AssetTable,AssetId));
      //  sysTablelookup.addLookupfield(fieldnum(AssetTable,Name));
      // sysTablelookup.addLookupfield(fieldNum(AssetTable,AssetGroup));
       query.addDataSource(tableNum(AssetTable));
       query.dataSourceTable(tableNum(AssetTable)).addRange(fieldNum(AssetTable, AssetGroupId)).value(dialogAssetGroupId.value());
       sysTablelookup.parmQuery(query);
       sysTablelookup.performFormLookup();
    }
    public void postBuild()
    {
       super();
       // From binding info, get the dialog field for racecode attribute and add button
       dialogAssetGroupId = this.bindInfo().getDialogField(
                            this.dataContractObject(),
                            methodStr(EA_CascadingContract,parmassetGroupid));
       if (dialogAssetGroupId)
       {
        dialogAssetGroupId.lookupButton(2);
       }
       // register override method for lookup cust Group
       dialogAssetGroupId.registerOverrideMethod(methodStr(FormStringControl, lookup), methodStr(EA_CascadingUI, lookupAssetGroup), this);
       // register override method for modified
       dialogAssetGroupId.registerOverrideMethod(methodStr(FormStringControl, modified), methodStr(EA_CascadingUI, AssetGroupModified), this);
       //binding info for customer drop down
       dialogAssetId = this.bindInfo().getDialogField(
                            this.dataContractObject(),
                            methodStr(EA_CascadingContract,parmAssetId));
       // register override method for lookup customer
       dialogAssetId.registerOverrideMethod(methodStr(FormStringControl, lookup), methodStr(EA_CascadingUI, lookupAssetId), this);
       if (dialogAssetId)
       {
           dialogAssetId.lookupButton(2);
       }
    }
    This is yours custGroupModified method which i changed to AssetGroupModified name, rest piece of code remains same.
    public boolean AssetGroupModified(FormStringControl _control)
    {
       dialogAssetGroupId.value(_control.valueStr());
      dialogAssetId.value('');
       return true;
    }



    try this code , rest of method would remains Unchanged.

    Note: please next time put your code in </> (On rich formatting form) which automatically manage your code.

  • Community Member Profile Picture
    on at

    Okay noted.

    Let me try this code and updating you back ASAP.

    thanks a lot.

  • Community Member Profile Picture
    on at

    i have tried the solution but did not work.

  • Rohin Profile Picture
    4,624 on at

    what do you mean by "did not work" any compilation error or others? please tell us more information

  • Community Member Profile Picture
    on at

    sorry i was so quick to response without checking properly...actually it works but it is only showing Computers and AC from fixed asset group list please see the picture .

    only-computer.JPG

    FYI cascading is working on AC split and computers.

    thank you

  • Community Member Profile Picture
    on at

    this issue is resolved too(showing two fields issue).Now i can see all the asset group list.....finally i just want show the unique fields in fixed asset group.

    thank  you so much for your help.appreciated

  • Rohin Profile Picture
    4,624 on at

    Does your issue is resolved ? or something pending . If resolved , please close the thread by mark verified as answer. other tell the problem with more details

  • Community Member Profile Picture
    on at

    issue is 80 percent resolved, i am stuck on multiple value in fixed asset group parameter.

    can you please help in finalizing.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 26

#2
imran ul haq Profile Picture

imran ul haq 8

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 4 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans