Wednesday, April 23, 2014

Axapta pass data to another form through menuitem

Below information shown the steps for passing the data from Form A to Form B when the menuitem button clicked.

1. Select the DataSource value that you wish to pass the data.


2. Add the code below at the Init method of the Form B


public void init()
{
    if (element.args().caller())
    {
        if (element.args().dataset() == tableNum(SalesTable))
        {
            _salesTable = element.args().record();

        }

    }
    super();
     }

Friday, April 11, 2014

Retrieve 1st Form highlighted data at 2nd Form

Write below code at 2nd form init method to retrieve 1st form highlighted record through menuitem display type.

 if (element.args().caller())
    {
        if (element.args().dataset() == tableNum(SalesTable))
        {
            _salesTable = element.args().record();
        }
       
    }