i had two checkBox CheckBox1 and CheckBox2.When i click the CheckBox1 automatically disabled the CheckBox2…When i click the CheckBox2 automatically CheckBox1 is disabled…in dialog Field
I think you need overwrite dialog field method
check this link
axlearn.blogspot.com.es/…/14-sobrescribir-los-metodos-de-los.html
dude i am not asking about in form… i need that in dialog field Run base
link has an example of overwrite method of a custAccount lookup method of a dialgo field of a runbase
yeah … but i want coading as by using classs… not a form
example is on a class but the first printscreen is of a form because I was explaining the idea of overwrite a method.
Maybe was better if you read this post
axlearn.blogspot.com.es/…/15-sobrescribir-los-metodos-de-los.html
thank u XBB…i got few idea but i want that in using CheckBox
i think in the link you have how to do this.
You need overwrite dialogPostRun to overwrite your method modified
dlgYourField.registerOverrideMethod(methodstr(FormStringControl, modified), methodstr(yourclass, yourmodifiedMethod), this);
and of course you need to create a modifiedMethod
hey i am new to ax … i already tried selectctrlmethod() which send u below
public void dialogSelectCtrl()
{
NoYesId allrecs;
;
allrecs = dialogfield.value();
if(allrecs==1)
{
//info(“hhh”);
dialogfield1.enabled(0);
super();
}
else
{
dialogField1.enabled(true);
super();
}
if(dialogField1.value() == NoYes::yes)
{
dialogField .enabled(false);
super();
}
else
{
dialogField.enabled(true);
super();
}
super();
}
how can i modified this code…??by your concept…
Copy on a notepad an rename extension txt to xpo an import on your ax.
Exportfile for AOT version 1.0 or later
Formatversion: 1
***Element: CLS
; Microsoft Dynamics AX Class: Class1 descargados
; --------------------------------------------------------------------------------
CLSVERSION 1
CLASS #Class1
PROPERTIES
Name #Class1
Extends #RunBase
Origin #{89BB6EA3-04C5-46AF-AB8D-03D378F8FB34}
ENDPROPERTIES
METHODS
SOURCE #classDeclaration
#class Class1 extends Runbase
#{
DialogField dlg1;
DialogField dlg2;
#}
ENDSOURCE
SOURCE #dialog
#protected Object dialog()
#{
Dialog ret;
ret = super();
dlg1 = ret.addField(extendedTypeStr(NoYesId), “One”);
dlg2 = ret.addField(extendedTypeStr(NoYesId), “Two”);
return ret;
#}
ENDSOURCE
SOURCE #dialogPostRun
#public void dialogPostRun(DialogRunbase dialog)
#{
FormComboBoxControl formControl;
super(dialog);
dlg1.registerOverrideMethod(methodStr(FormComboBoxControl, Modified), methodStr(Class1, dlgmodified), this);
#}
ENDSOURCE
SOURCE #dlgmodified
#public boolean dlgmodified(FormComboBoxControl _control)
#{
dlg2.enabled(dlg1.value() == NoYes::No);
return true;
#}
ENDSOURCE
SOURCE #main
#static void main(Args args)
#{
Class1 c = new Class1();
if (c.prompt())
c.run();
#}
ENDSOURCE
ENDMETHODS
ENDCLASS
***Element: END
very thank u dude… y u use comboBoxControl for checkbox??
yeah because NoYesId extendedDataType comes from a NoYes enum and all enums are combobox
XBB i got it Thank … so much