You need to sign in to do that
Don't have an account?
wsthesis
I want to programmatically (using visual force or apex code) recreate this same drop down list in a new apex controller/visualforce page.
"View" Filters on Home Tabs
On many of the "home" tabs (ex) leads, contacts, accounts, opportunities) underneath the initial header, there is a
View: ____drop down list_______ [Go] {Edit Link} {Create New View}
I want to programmatically (using visual force or apex code) recreate this same drop down list in a new apex controller/visualforce page.
1. Where in the schema is this view information stored? What's the SOQL object name (or field(s)) to get this list of views (for use in a SOQL query)?
2. Is there an apex tag that renders this list?
2. Is there an apex tag that renders this list?
Sorry for the double post in apex code/visual force, but I'm unsure which boundary it falls into. Thanks in advance.
"For example, to create a simple list of accounts with a list view, create a page with the following markup:
When you open that page, you'll see something like the following:
This page is associated with the standard account controller and the apex:selectlist component is populated by {!listviewoptions}, which evaluates to the list views the
You can also use a view list on an edit page, like the following:"user can see. When the user chooses a value from the drop-down list, it is bound to the filterId property for the controller.
When the filterId is changed, the records available to the page changes, so, when the apex:datalist is
updated, that value is used to update the list of records available to the page.
Message Edited by MATTYBME on 12-16-2008 06:14 AM
Formally, I did not realize that this is called a list view.
006R0000002evRwIAI
006R0000002fPJXIA2
006R0000002fPJdIAM
006R0000002fPJcIAM
006R0000002evZEIAY
006R0000002evZ5IAI
Assume that I saved this list view id value in my controller. In my controller, is there anyway to query for the "list view's" associated accounts/opportunities/etc.?
I want to use this view list's opportunities (all 6 opportunity ids in my example) in other controller methods.
Administrator: I'm not sure now if my question really falls into Visualforce anymore. Please rename the subject and/or move if necessary. Thanks!
Andrew,
Thanks for your response, but I'm confused by the implementation.
I understand that it will return (in my case) a list of Opportunities. But, realize that it is a subset of the full list of opportunities (as per the definition of "list view options". My interpretation is as follows:
---------------------
---------------------
How will I be able to filter the records that were selected in the visualforce (view) page? How does getRecords() know what filter was selected? Is this supported?
SOQL query within controller code:
Please let me know if you need me to clarify. Thanks in advance.