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
eriktowneriktown 

Contact list displays for some users but not for others

I recently uploaded a managed beta of my app to my test org for the first time, and I'm seeing some very strange behavior! My app contains a page which uses the Contact standard controller to display a list of contact names and email addresses. This works fine for me in the test org, and it works fine for another user I created - but the third and fourth users I created see no list of contacts!

 

I have verified that both have created several contacts, so the problem isn't simply that they have no contacts. Yet it seems like the contact list just isn't being populated by the Contact controller. I just don't get why this works for some users and not for others. Any ideas? I've pasted a copy of my Visualforce page below. (The controller extension doesn't do anything exciting, it just handles input and some redirects). 

 

If anyone has any idea what the problem could be, I would be very grateful to learn it!

 

<apex:page standardController="Contact" extensions="ListExtension" recordSetVar="contacts" tabStyle="Card__tab">
    <apex:form >
        <apex:pageBlock title="Contact List" mode="edit">
         <apex:image id="banner" value="{!$Resource.banner}"/><br/>
            <apex:pageMessages />
            <apex:outputPanel id="contactList"> 
            <apex:commandButton value="Configure" action="{!configure}"/>
            <apex:pageBlockTable value="{!contacts}" var="contact">
                <apex:column value="{!contact.Name}"/>
                <apex:column headerValue="Email" value="{!contact.email}">
                </apex:column>
                <apex:column headerValue="Select">
                    <apex:commandButton value="Select" action="{!chooseContact}" rerender="contactList">
                        <apex:param name="cemail" value="{!contact.email}" assignTo="{!contactEmail}"/>
                    </apex:commandButton>
                </apex:column>
            </apex:pageBlockTable>  
            </apex:outputPanel>    
        </apex:pageBlock>
    </apex:form>
    </apex:page>

 

 

 

kritinkritin

Have you given the Page & Controller access at Profile level.? If not please give access.

eriktowneriktown

I tried both editing the user and editing profiles, but I don't see any option to change access to Page or Controller. Can you tell me where this is set?

eriktowneriktown

Actually, I just figured out the problem.

 

By default, the Contacts tab displays only contacts who have birthdays in the near future.  Apparently this default also applies to any app which uses the Contact controller.

 

Users have to go to the Contact tab and select "Show all contacts" instead; after that, the contacts show up in the app as expected.

 

So now my question becomes this: is there any way to override the behavior of the Contact controller so that it shows all contacts automatically?