Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

hide single parameter from Dialog box

Posted on by Microsoft Employee

I want to hide single parameter from Dialog box in action menu item in ax 2012 I use UIBuilder class with action menu item, i modified build method in  UIBuilder  as below but all parameters hide from all groups but i want a single parameter only, any help.

public void build()
{

FormBuildGroupControl   grp;
grp = this.dialog().curFormGroup();
grp.frameType();

grp.columns(3);

if(this.controller().parmArgs().menuItemName()==menuitemactionStr(hegazy2))
{
grp.visible(false);
}
super ();

}

*This post is locked for comments

  • Suggested answer
    Chaitanya Golla Profile Picture
    Chaitanya Golla 17,225 on at
    RE: hide single parameter from Dialog box

    Hi Mostafa,

    I could see the methods don't have the prefix "parm", please update the methods with prefix parm(Refer: InventTransferOrderOverviewContract) and are you able to get the value from the dialogfield dfllowCustomer.

    Thanks,

    Chaitanya Golla

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: hide single parameter from Dialog box

    Thanks Chaitanya Golla,

    I override dialogSelectCtrl im my uibuilder as below but does not work.parameters in menu item hide depend on check box.

    public void dialogSelectCtrl()

    {

       super();

       contract = this.dataContractObject();

       dfcustomer        = this.bindInfo().getDialogField(contract,

    methodstr(SalesAnalysisContract,Customer));

       dfallowcustomer   = this.bindInfo().getDialogField(contract, methodstr(SalesAnalysisContract,AllowByCustomer));

       dfitemid          = this.bindInfo().getDialogField(contract, methodstr(SalesAnalysisContract,ItemName));

       if (dfallowcustomer.value()==NoYes::Yes)

       {

           dfcustomer.allowEdit(true);

           dfitemid.allowEdit(false);

           dfitemid.value(0);    

       }

       else

       {

           dfitemid.allowEdit(true);

           dfcustomer.allowEdit(false);

           dfcustomer.value(0);

       }

    here is menu item:

    1234.menu.PNG

  • Chaitanya Golla Profile Picture
    Chaitanya Golla 17,225 on at
    RE: hide single parameter from Dialog box

    Hi,

    There are several ways to enable/disable parameters on the dialog.One way is to override the dialogSelectCtrl on the UIbuilder class, access the dialogfield with the help of parm method and enable/disable it. You can refer method dialogSelectCtrl of class InventTransferOrderOverviewUIBuilder for implementation.

    Thanks,

    Chaitanya Golla

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans