Monday, February 15, 2016

How to refresh the FormGrid after updating the data in AX 2012 using X++

void clicked()
    FormRun callerForm;
    Args args = new Args();

    callerForm          = element.args().caller(); //caller form
    callerForm.dataSource().refresh(); //refresh the form cache
    callerForm.dataSource().reread(); //will only re-read the CURRENT record from the DB
    callerForm.dataSource().research(); // will rerun the existing form query against the data source, //therefore updating the list with    new/removed records as well as updating existing ones.



How to enable the dimension fields based on the Item selected on the form.

[Form] public class KMTShipFromWarehouses extends FormRun {     InventDimCtrl_Frm_EditDimensions        inventDimFormSetup;     /// &l...