function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ehrenfossehrenfoss 

listviewoptions in VisualForce page, filter permissions

I notied an issue with the {!listviewoptions} available on a list view in VisualForce.  Related to this thread:

http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=7723

I defined a set of filters, and also defined permissions on those filters so that, say, half of them were for Customer Portal users and the other half were for System Administrators.  However, when you use {!listviewoptions} in VisualForce, a la

Code:
   <apex:selectList id="viewList" size="1" value="{!filterId}">
    <apex:actionSupport event="onchange" status="listStatus" rerender="aarList" />
     <apex:selectOptions value="{!listviewoptions}" /> 
     <!--<apex:selectOptions value="{!ViewSelectOptions}" /> -->
   </apex:selectList>

 Then you get the whole list, and it does not pre-filter the filters, so to speak, by the user's profile.  Maybe this is a bug, maybe it's intentional.  Either way, it is proving extremely difficult to elegantly get around this problem.   Is this a bug?  How would you solve it?  I've looked into a variety of solutions, and I'm trying to avoid building out a custom SetController extension just for this. 

Pault.ax256Pault.ax256
It is a bug that I have encountered on a project.  For now we have had to display the standard Salesforce pages with the list views (that do work) and override the 'edit' and 'view' links to go to the Visualforce pages we want.