how to pass mutliple selected records in to other form in ax 2012

hi all,

i am trying to develop a ax 2012

Functionality

the scenario i is : when user select a mutliple line in a grid and click on > function > create purchase order menubutton

it should transverse record which contains tthe salesid -salesline

in standard it is allowing for one record , when i am trying to do not able to pass the container value to init method of the form

the problem here is : i have written code in clicked method and it is working fine

after that ,it hits the class purchcreatesaleorderform class in this a main and mainonserver methods are there

i am getting the value in main class -conttainer values but after this main on server method calls

from this i am not able to pass my container value to form :init method ;

code as follows :in main method

switch(callerFormName)

{

case formStr(ProjSalesItemReq):

pcgarg =args.parmObject();

callerrecordloc =args.record();

consaleorderlist = pcgarg.parmcontainer();

PurchCreateFromSalesOrder.parmcontainer(consaleorderlist);

for(counter =1; counter<=conLen(consaleorderlist) ; counter++)

{

salesidloc =conPeek(consaleorderlist,counter);

select SalesTable

where SalesTable.SalesId ==salesidloc;

callerrecordloc = SalesTable;

qbds = q.addDataSource(tableNum(SalesLine));

qbr=qbds.addRange(fieldNum(SalesLine,SalesId));

qbr.value(salesidloc);

}

PurchCreateFromSalesOrder::pcgmainOnServer(callerrecordloc,args.parmEnum(),consaleorderlist);

after this pcgmainOnServer method not able to pass my container value ,if i passed here with parameter container

from here not able to get the value in the form init method …

if any body know the solutions please help me …

The usual way to get the value from args.record() (no code in clicked() is needed), obtain its FormDataSource instance and iterate through selected records (use MultiSelectionHelper class to make it even easier).

Then you have several options, but I would simply create a method for adding records one by one (addRecord(), for example). You’ll also need to adjust #CurrentListCS macro to get the records serialized.

hi Martin Dráb,

thanks for u r reply it is working now . i had taken my own method to intalize the parmmethod

not the standard dialog method.

thanks for u reply it help me more to slove this issue

can i have u r mail id …???

thanks,

srikanth.v