SETSELECTIONFILTER on subpage in RTC

zeon
Member Posts: 130
Hi,
I have some problems with the SETSELECTIONFILTER on a subpage in RTC. I need to find the Sales Lines that the user have marked, and send them to a report afterwards. So, on Page 42 Sales Order I have a button with the code.
And on the Sales Order Subform I have the following code:
My problem is that the message about the line selected is always one step behind. E.g the user selects Line No. 10000. Then the message shows the lines that were marked before. Then when the user selects a new set of lines it will then show Line No. 10000, which was selected previously.
What the heck am I doing wrong?
I have some problems with the SETSELECTIONFILTER on a subpage in RTC. I need to find the Sales Lines that the user have marked, and send them to a report afterwards. So, on Page 42 Sales Order I have a button with the code.
CurrPage.SalesLines.FORM.OpenCopyCalcLines;
And on the Sales Order Subform I have the following code:
CurrPage.SETSELECTIONFILTER(SalesLine); IF SalesLine.FINDSET THEN REPEAT MESSAGE(FORMAT(SalesLine."Line No.")); UNTIL SalesLine.NEXT = 0;
My problem is that the message about the line selected is always one step behind. E.g the user selects Line No. 10000. Then the message shows the lines that were marked before. Then when the user selects a new set of lines it will then show Line No. 10000, which was selected previously.
What the heck am I doing wrong?
0
Answers
-
Hi,
CurrPage.SETSELECTIONFILTER(SalesLine);
SalesLine.MARKEDONLY(TRUE); // I think you forgot to write this line.
IF SalesLine.FINDSET THEN
REPEAT
MESSAGE(FORMAT(SalesLine."Line No."));
UNTIL SalesLine.NEXT = 0;
Hope this will solve your problem.
Thanks & Regards,
Purvesh Maisuria.0 -
You are not doing anything wrong. You just found a flaw :oops: in the current release ....
Please stay tuned for the final NAV2013 release :
Troels Bent Hansen
Senior Program Manager
Microsoft Dynamics NAV
****** This posting is provided "AS IS" with no warranties, and confers no rights ******0 -
Thanks for your input, but this does not do the trick.
As far as I know markedonly does not work in NAV2009 under RTC.0 -
Troelsh wrote:You are not doing anything wrong. You just found a flaw :oops: in the current release ....
Please stay tuned for the final NAV2013 release :
But what is the best approach to handle these scenarios? The user selects a few lines on a subpage, and we as coders wants to handle these lines - send them to a report or codeunit or whatever?
TIA0 -
To do as you have done in the example; but instead pass the value(s) to a report.run.
Troels Bent Hansen
Senior Program Manager
Microsoft Dynamics NAV
****** This posting is provided "AS IS" with no warranties, and confers no rights ******0 -
Purvesh Maisuria wrote:SalesLine.MARKEDONLY(TRUE); // I think you forgot to write this line.Regards
Peter0 -
Hi guys, there's a bug in GETRECORD, SETSELECTIONFILTER in NAV 2013 R2. Check this out:
Check this out: https://community.dynamics.com/nav/b/vi ... round.aspx0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions