FILTERGROUP filtering fails after SETSELECTIONFILTER
Rebogh
Member Posts: 13
Story of one bug. NAV 2015 W1.
I want to get some lines from filtered page. So, I`ve created global function on a page with SETSELECTIONFILTER and some piece of code:
you`ll get what you expect. But if you want to select all the lines in view (either pressing ctrl+c or nice button in top-left page corner),
you`ll get all the lines, ignoring filtergroup! Some solution you can see below comments, but it`s not the way it should be)
If someone can advise how can this bug be sent to Microsoft - it would be nice. Cause I didn`t find a quick way to do this...
I want to get some lines from filtered page. So, I`ve created global function on a page with SETSELECTIONFILTER and some piece of code:
PurchaseLine.FILTERGROUP(20);
PurchaseLine.SETRANGE("Document Type",PurchaseLine."Document Type"::Order);
PurchaseLine.SETRANGE("Document No.",PurchaseDocumentHeader."Order No.");
PurchaseLine.FILTERGROUP(0);
PurchaseLines.LOOKUPMODE(TRUE);
PurchaseLines.SETTABLEVIEW(PurchaseLine);
IF PurchaseLines.RUNMODAL = ACTION::LookupOK THEN BEGIN
PurchaseLines.GetSelectedLines(PurchaseLine);
//need to duplicate prev. filters in case of copy all lines with filtergroup error
PurchaseLine.SETRANGE("Document Type",PurchaseLine."Document Type"::Order);
PurchaseLine.SETRANGE("Document No.",PurchaseDocumentHeader."Order No.");
View on page is filtered correctly. When you select some lines and click OK -you`ll get what you expect. But if you want to select all the lines in view (either pressing ctrl+c or nice button in top-left page corner),
you`ll get all the lines, ignoring filtergroup! Some solution you can see below comments, but it`s not the way it should be)
If someone can advise how can this bug be sent to Microsoft - it would be nice. Cause I didn`t find a quick way to do this...
0
Comments
-
Hi,
I don't know where to report bugs either, but I can confirm that SETSELECTIONFILTER does not work as it used to, nor as it is documented online.
It copies only filters of some assorted filtergroups. Try filtergroup 3 for instance. That works.
Btw. I did not find a function PurchaseLine.GetSelectedLines. Is it a customization?
0 -
Thank`s for reply, I`ll try to use third group.
Yep, that is custom function to retrieve SETSELECTIONFILTER result.0
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
- 323 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
