How to store multiple selected records and pass to another object(Form / Report) ??

Hi,

My requirement:

Select multiple records on a form and click on menuitem button (on the report) so that it should create a report for those records.

My Codes:

void clicked()
{
CustTable _CustTable;
str menuItemStr;
MenuFunction menuFunction;
Args _args1 = new args();
;
super();
//getFirst method gets all the selected records in the grid
_CustTable = CustTable_ds.getFirst(true);

while (_CustTable)
{
// get the next selected record
_CustTable = CustTable_ds.getNext();
_args1.record(_CustTable);
}
menuItemStr = menuitemoutputstr(ABC_TestReport);
menuFunction = new MenuFunction(menuItemStr, MenuItemType::Output);
menuFunction.run(_args1);
}

Challenges:

for one selected record it is working but i need if it multiple record how can capture those records and pass through a menuitem.

Please help me on this requirement.

Hi,

Refer the Classes\SalesTableForm\EnableUpdateJournalButtons()

Thanks,

Valeru.

Thanks Valeru for rplieing . but i couldn’t able to get any solution from this class\method().

Please help me out if any other solutions you have.

Regards…

Jagadis

Hi Jagadis,

same like create new calss and method, in the menuItemButton properties give the class menuItem, pass the Table

use that table as a parameter in the class and implement the method same as the above mentioned class\method().

Thanks,

Valeru.