Saturday, November 21, 2015

How to open the Child form using X++

Error :- Dynamics AX form requires an active buffer

Here is the code for above explanation: -

        Args                    argsForm;
        FormRun             formRun;
        FormRun             subformRun;
        ;
   

        //Open Picking List form
        argsForm = new Args(formstr(ProdJournalTable));
        argsForm.record(ProdJournalTable::find(prodJournalTable.JournalId));
        formRun = classFactory.formRunClass(argsForm);
        formRun.init();
        formRun.run();


        //Now open sub-form (Production Journal Lines)
        argsForm = new Args(formstr(ProdJournalTransBOM));
        //Here you can mention the parent form instance as an active buffer
        argsForm.caller(formRun);    
        argsForm.record(ProdJournalTable::find(prodJournalTable.JournalId));

        subformRun = classFactory.formRunClass(argsForm);
        subformRun.init();
        subformRun.run();
        formRun.close(); //Now close the parent form.
        subformRun.wait(); //This halts your programme execution.

Wednesday, November 4, 2015

How to change the Infolog limit in AX 2012 ?

Hi Folks !

Recently I got a requirement to import a list of Items in AX  and  also I have to make a list of Imported item. Well the problem was the list exceed 10000 Limit.

Default limit of Infolog messages is 10000. I have found a solution for this limit.

You can change the value of  MaxErrors macro in viewBuild() method of Info class


Hope this information will help you

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...