You need to sign in to do that
Don't have an account?
shankar anand
Filter Id and ViewListOptions
I was going through the following code:
<apex:page standardController="Account" recordSetVar="accounts">
<apex:form>
<apex:selectList value="{!filterid}" size="1">
<apex:selectOptions value="{!listviewoptions}"/>
</apex:selectList>
<apex:commandButton value="Go" action="{!list}"/>
</apex:form>
</apex:page>
Can someone tell me how I can see the Filter IDs for the Custom Views I create on the List View page? Also is there a way to see the ListViewOptions? Are they also IDs or plain Strings?
<apex:page standardController="Account" recordSetVar="accounts">
<apex:form>
<apex:selectList value="{!filterid}" size="1">
<apex:selectOptions value="{!listviewoptions}"/>
</apex:selectList>
<apex:commandButton value="Go" action="{!list}"/>
</apex:form>
</apex:page>
Can someone tell me how I can see the Filter IDs for the Custom Views I create on the List View page? Also is there a way to see the ListViewOptions? Are they also IDs or plain Strings?
https://<x>.salesforce.com/a3N?fcf=00B70000007iWhy
here 00B70000007iWhy is filter id.
listviewoptions is type of List<SelectOption>. which will have value and lable. value is Id as above, and the name is list view name.
The below code generates html <option> for list of listview you have for an object
VF :
<apex:selectOptions value="{!listviewoptions}"/>
HTML:
<option id="00B70000007iWhy">listview1</option>
<option id="00B70000007zWhy">listview2</option>
below code will generate html <select>
VF :<apex:selectList value="{!filterid}" size="1">
Html <select name="filterid">options..</select>
so what ever list view you choose, the id of the list view will be passed to filterid param, the standar controller will use that param to filter the records.
What am I missing here? Isn't it true that Filter Id will be different for each of My Accounts, New This Week, New Last Week, etc??
filterid will be different for each list view. just verify your result if you getting correct result when you change the list view option.