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
liwuliwu 

Vf/Apex page privileges

I have a VF page with APEX controller. The controller does a 'contact' DB query. This works fine for contacts that are part of an account. If however there is a contact which is not part of an account, the controller DB query doesn't return the correct results.

 

I presume this has something to do with "Contacts not associated with accounts are private and cannot be viewed by other users or included in reports." which is displayed on the "Edit contact" page.

 

Is there a way I can allow the VF/Apex page of mine access to view ALL contacts (including the ones that do not belong to an account)? And more importantly, can I add this setting (if it exists) as part of my app which includes this VF/Apex page.

 

sandeep1989sandeep1989

can you post your query