You need to sign in to do that
Don't have an account?
aka_flo
Not All Results Displayed
<apex:page standardController="Opportunity" recordSetVar="opportunities" tabStyle="Opportunity" sidebar="false"> <apex:pageBlock > <apex:repeat value="{!opportunities}" var="opp"> <apex:outputPanel rendered="{!IF(opp.Status__c == 'Subscriber',true,false)}" > {!opp.Name}, </apex:outputPanel> </apex:repeat> </apex:pageBlock> </apex:page>
I have created the above code; however, I have noticed that this is only reviewing the top maybe 20 results from the full opportunities list. Does anyone have any ideas on why this would be happening? If it doesn't evaluate the entire list, then I don't get the results that I want.
When you run the code, the Standard list controller picks the most recently used filter - the list view currently selected on the Opportunities tab. Go to the Opportunities tab to check the currently selected filter - it is limiting your result set.
If you remove the following condition:
the VF page will render the same results as the currently selected list view.
This link explains the relationship between list views and Standard list controllers:
http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#StartTopic=Content/pages_controller_sosc_list_views.htm
If possible use list view selection drop-down, similarly to the example provided in the documentation - set the filterId property based to a value from the listviewoptions. If that is not possible you may have to create your own custom controller to display the data you need.
All Answers
When you run the code, the Standard list controller picks the most recently used filter - the list view currently selected on the Opportunities tab. Go to the Opportunities tab to check the currently selected filter - it is limiting your result set.
If you remove the following condition:
the VF page will render the same results as the currently selected list view.
This link explains the relationship between list views and Standard list controllers:
http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#StartTopic=Content/pages_controller_sosc_list_views.htm
If possible use list view selection drop-down, similarly to the example provided in the documentation - set the filterId property based to a value from the listviewoptions. If that is not possible you may have to create your own custom controller to display the data you need.
Another quick question... is there a way that I can set the sort order for the records that appear based on the view selected? If so, how?
Records are sorted on the first column of data. To implement custom sorting you'll need to use a custom list controller: http://www.salesforce.com/us/developer/docs/pages/Content/pages_custom_list_controller.htm#topic-title
I had a feeling that you were going to say that. Since I do not have the ability to create controllers in the Professional Edition I will have to find another work around. It doesn't make sense for these items to order alphabetically.
I will either have to switch the order of the columns or try to use an iframe to import a report that I created. Do you happen to know I can remove the filters on a report used in an iframe, so that I do not have to worry about the extra stuff appearing. I only want to see the results.
Thanks!