Default Views in Filter pane

shibily
Member Posts: 89
Hello,
I have a List page and it has a field named "Open". Also, I have Open and Closed views written in code for the page to filter on the field "Open", so that the user can click on each view to filter the records. I can see three views on the page "All", "Open", and "Closed".
I have a Role center Cue to view only the opened records. When I click on this cue, it always filters only the open records as expected, but it defaults to "All" view on the page. Is there a way to get my custom filter to be the default one, which means it defaults to the Open when I click on the Cue in Role Center?
Thanks, in advance.
Shibily
I have a List page and it has a field named "Open". Also, I have Open and Closed views written in code for the page to filter on the field "Open", so that the user can click on each view to filter the records. I can see three views on the page "All", "Open", and "Closed".
I have a Role center Cue to view only the opened records. When I click on this cue, it always filters only the open records as expected, but it defaults to "All" view on the page. Is there a way to get my custom filter to be the default one, which means it defaults to the Open when I click on the Cue in Role Center?
Thanks, in advance.
Shibily
0
Answers
-
It is unclear what you want to get, and unclear how you realized your filter and associated GUI elements. Regardless, you probably need to check the filter set on Rec, and adjust the "state" you are maintaining accordingly. OnOpenPage may work. If it does not, or better anyway, use OnFind. Just add the following line after you have done your thing:
EXIT(FIND(Which));
0 -
@vaprog Thanks for your reply.
Sorry that it is not clear.
So, I have written code to add views in filter pane of the page. please see below.
views
{
view(OnlyOpen)
{
Caption = 'Open';
Filters = where(Open = CONST(true));
}
view(OnlyClosed)
{
Caption = 'Closed';
Filters = where(Open = CONST(false));
}
}
These additional filter views will help the user to toggle between the open and closed records.
On top of these two custom Open and Closed Views, there is another system generated view called "All", and it shows all records.
So, I have a Role center Cue, where I wanted to show only open records. When the user clicks on it, the page will filter only open records (based on the filter set in cue table), but as it is showing only open records, I wanted the "Open" View gets selected in that case. unfortunately, it is selecting the "All" view by default in this case. Please see the screenshot below where I have 3 views in the filter pane.
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
- 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