Row Selection in a Page

Does anyone know how to pass a selected row in a list part to the parent page?

I am currently tring to use this function:

GetSelectedRec(VAR VarRec : Record “Item Ledger Entry”)

CurrPage.SETSELECTIONFILTER(VarRec);

but i keep getting the first entry rather than the the selected.

ive been trying to pass the information from part page to parent page, from my recent work ive tried to using some function which we can use it to be called on parent page. simply put :

  1. create function on list part page to return value of record from list

  2. create a function too in parent page with same name and parameters,

  3. and call it with page variable from parent page this return value from function will display in parent, depends on Trigger you will use

To Clarify the call is from an action in the header page, using:

CurrPage.ILEsf.FORM.GetSelectedRec(selectedILE);

MESSAGE(’%1’,selectedILE.“Lot No.”);

and the function is in the sub page as a function.

I have found a solution. It seems that pages won’t allow you to use the SETSELECTIONFILTER in its proper form - it will always return the first record. However with the help of Mark Brummel’s Blog:

http://dynamicsuser.net/blogs/mark_brummel/archive/2009/11/22/tip-15-execute-actions-on-subpages-from-the-action-pane.aspx

I was able to use a line function. This works fine.

Also, you can use the OnAfterGetCurrRecord() trigger in a list part to detect when the user has changed the selected record in the list .

Like an OnSelectionChanged event.

Dave K.