Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

Get selected records from a lookup/modal page

$
0
0
Hello.
I'm creating a page with an action button to open a window that shows posted shipment headers to pick some of them and insert them in a table.
The structure is: page->action button->run codeuntit->call to a page that shows headers->pick some lines->call back to codeunit-> call to insert lines.

I have the problem in the callback from modal page (headers) to codeunit, because in the codeunit I get all the rows, not the selected rows.
In my headers page I have:

CurrPage.SETSELECTIONFILTER(Rec);
MESSAGE('Qty: ' + FORMAT(Rec.COUNT)); // I get the right number of selected rows for example 2
MyCodeunit.CreateLines(Rec);

After, in MyCodeunit, in CreateLines funtcion, I receive all the lines, not the selected lines. If I check the COUNT again it counts all the lines. I thought Rec sends to the codeunit only selected lines. Is this correct? What can be the problem?

Page source table is "Sales Shipment Header". Codeunit variable is a record of "Sales Shipment Header".

All the best!

Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>