Friday, October 1, 2021

How to use form global variables in Form DS/Form control extension class in D365fo using x++.

 One Table is declared in the form 'class declaration' method (Global). I want to access that table buffer in my form control extension class(COC). For achieving that I used the below code.

     [ExtensionOf(formControlStr(MyForm, MyControl))]

public final class MyFormMyControl_Extension { public boolean modified() { // FormCheckBoxControl control = any2Object(this) as FormCheckBoxControl; // FormRun control = tax.formRun(); FormRun FormRun = salesTable_ds.Formrun(); boolean ret; MyTable myTable = element.myTable;
            // My table buffer declared in "class declaration" method.(Global) ret = next modified(); myTable.parmmethod(this.value()); //element.enableSearch(); return ret; } }


Keep daxing!!

No comments:

Post a Comment