SalesInvHeader := Rec; CurrPage.SETSELECTIONFILTER(SalesInvHeader); SalesInvHeader.PrintRecords(TRUE);
PrintRecords(TRUE)
Currpage.SETSELECTIONFILTER(Rec); PrintRecords(TRUE);The List shows only the selected Records after you trigger that code. You should see that a filter is applied.
Answers
only PrintRecords(TRUE) shouldn't work, because u need to apply a filter. That's why you use SETSELECTIONFILTER.
See here:
-> https://docs.microsoft.com/en-us/dynamics-nav/setselectionfilter-function
If you use CurrPage.SETSELECTIONFILTER(Rec), the filter is applied to Rec. So you can't, for example, jump to the next or previous record, because a filter is applied.
The same function should be used in the Page "Posted Sales Invoices (143)".
If you use The List shows only the selected Records after you trigger that code. You should see that a filter is applied.
It gives you all the filters that is manually selected by the user!
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/