1

I have added a multi-record list button to the Contact object that forwards the selected records to a custom VisualForce page that is defined below.

<apex:page standardController="Contact" recordSetVar="selectedContacts">
    <apex:form >
        <apex:pageBlock id="pb" title="Selected Contacts">
            <apex:pageBlockTable id="pbTable" value="{!selected}" var="c">                    
                <apex:column value="{!c.id}"/>
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

This button works as expected in most cases. However, when a Topic filter (screenshot below) is used on the Contact list view I get the following exception when clicking on the button:

system.security.NoAccessException: Object type not accessible. 
Please check permissions and make sure the object is not in development mode: 
Contact WHERE ( ((Topics INCLUDES 'Demo')) AND (id IN ('003F000001LLMhJIAX' 
^ ERROR at Row:1:Column:88 expecting a left parentheses, found 'Demo' 


Screenshot of the Topic filter

Screenshot of the Topic filter

Question: What could be causing this problem?

  • Using INCLUDES in queries typically requires an array of comma delimited values and I would have expected to see it written as Contact WHERE ( ((Topics INCLUDES ('Demo') )) AND even though there is just a single value in the list. This is also consistent with the error message. Is this a query which you created in code or is it auto-generated by the List View's filter criteria? Can you add a picture of the Filter Criteria on your view? – Mark Pond Apr 29 '14 at 0:55
  • Hmmm, this looks like a bug in the StandardSetController to me. – Andrew Fawcett Apr 29 '14 at 10:34
  • Just been looking to see if I can reproduce this, can you include a screenshot of your List View definition please? – Andrew Fawcett Apr 29 '14 at 10:43
  • @Pond The filter is from a standard list view. I have added a screenshot of the filter to the question. – csnullptr Apr 29 '14 at 14:14
  • I've also opened a case with Salesforce. No response yet. – csnullptr May 1 '14 at 14:58
0

This behavior has been identified as a bug by Salesforce.

Track the status of this issue here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.