Yesterday I've discovered a bug in NAV 2013 R2 (I used build 7.10.37221) that results in inappropriate execution of GETRECORD and SETSELECTIONFILTER functions.
Problem description:
Both GETRECORD and SETSELECTIONFILTER always retrieve first record from SubPage despite other record is selected.
For demo of the bug I've copied Sales Order page with SubPage, removed unnecessary controls and created two actions:
- GETRECORD
- SETSELECTIONFILTER
with following code:
Both GETRECORD and SETSELECTIONFILTER retrieved first line of the document despite third one was selected. So the bug is that whichever record is selected in SubPage both functions always retrieve first record.
Workaround
After few attempts to find out what's wrong I discovered that workaround is very simple - both functions work correctly when I place any code (or even empty comment) to OnAfterGetCurrRecord() trigger of SubPage:
I hope this bug will be fixed soon :)

Like
Report
*This post is locked for comments