I have a requirement in nav2013. In Sales order sub page(sub form) , add a new action button. When use clicks the action button, it should open a list page designed with ILE(3table 32). When he selects one or more that one records in the list page and click "OK" button in the list page. It should insert new lines in Sales Order Subpage, based on the selected records(MARKED ONLY) in List Page.
I have included following codes in Action Button of Sales order Subpage and in List Page, But not working
Action Button(Sales Order Sub Page)
ILE.reset;
ILE.setrange(entrytype,entrytype::Sales);
ILE.Setrange("Source No","Sell to customer No");
if Page.runbmodal(50123,ILE):= Action::Ok Then
List Page
Local Variable
ItemLedgerenty Record 32
ItemLedgerenty.copy(Rec);
currpage.setselectionfilter(ItemLedgerenty);
Iam able to get the marked record in list page by means of above code, but not able to carry that selected records to subpage.
Could any one help how to proceed with that.
0
Comments
ILE.reset;
ILE.setrange(entrytype,entrytype::Sales);
ILE.Setrange("Source No","Sell to customer No");
if Page.runbmodal(50123,ILE):= Action::Ok Then
"Source No" := ILE."Source No"
Add Which Field you want to select and fill it to field.
where in the page did you place the code you labeled "List Page" in your post, and most importantly, where and how do you call it?
You need to place it in a global function with ItemLedgerenty as a VAR parameter. The ItemLedgerenty.COPY line is superfluous. Such a function is typically named SetSelection in standard NAV.
In the Sales Order subpage use a page variable: