Posts

Showing posts from 2020

Edit Methods in AX 2012

Indicates that the methods return  type  is to be use to provide information for a field that is used in a form only    We can create edit method on the   1. Table methods 2. Form methods 3. Form datasoruce methods           Take the new method in the table, and then drag that method into the grid and set data source properties.  In that field is  user can edit  it and accept the values to the user and save it CustTable.    Edit Name name(boolean _set , Name _name) {     Name    name    = _name;     CustTable   custTable;     ;     if(_set)     {         if(name)         {       ...

Display methods in AX 2012

Indicates that the methods return value is to be displayed on a forms (or) Reports . The value cannot be  altered  in the form or report.   Take the new method in a table, and then drag that method into the grid and set data  source  properties.  In that field is non-editable.   We can create display method on the 1. Table methods 2. Form methods 3. Form data source methods 4. Report methods 5. Report design methods   Display Name names () {     CustTable   custTable;     ;     return  CustTable::find(this.CustAccount).Name; }     OR   In some scenarios, we need to display some values derived from other columns and those are not associated directly with the database, like Amount fields (Unit*Price). In that case there are display methods that perform that functionality.  ...

Applying validation on fields (methods) in dialog form in Ax 2012

 1. go to class declaration and make the following "FormBulidStringControl" FormBuildStringControl                  controlFromDataAreaId,controlToDataAreaId,controlGeneralType,controlMainAccounts,controlDivision; 2. now in the "dialog" method write the following method,below the field where we enter value controlFromDataAreaId = dlgFromDataAreaId.control(); 3. now in the ""dialogPostRun" method write the following code controlFromDataAreaId.registerOverrideMethod(methodStr(FormStringControl,Validate),                                             methodStr(TTC_EOM,fromtoEntity_Validate),                                             this); 4. now make a new method, in this case ""fromtoEntity_Validate public boolean fromtoE...