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
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
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:
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156