+ Start a Discussion
Priyanka PallepatiPriyanka Pallepati 

Salesforce community user not able to query contact

Hi - 

Here is my scenario.. I have logged into community using an partner community user 1 and in my vf page I am getting partner community user 2 by its id and getting the related contact to it...
Even though the partner community user 2 has a contact in SF, when I query for it, the rows returned are zero. 

Is it some security that needs to be enabled for partnery community user 1 profile(the one which I am logging into community)?
Pavel Korshunov 11Pavel Korshunov 11
Look at  Security Controls -> Sharing Settings (you can set Organization-Wide Defaults for Contact to Public access) or just Share nedded Contact as describe at https://developer.salesforce.com/page/Using_Apex_Managed_Sharing_to_Create_Custom_Record_Sharing_Logic
PratikPratik (Salesforce Developers) 
Hi Priyanka,

Please check the OWD settings for contacts.