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
theAlchemist2889theAlchemist2889 

Partner Community User Access on User Object

I am working on a requirement where we have set up partner community and set up users with 'partner community user' and their cloned profiles. We have a custom filed on user Named 'Status'. When the user is created their 'Status' will be inactive. Then they will go to community login (custom) page and login and go to EULA page and when they click on 'Submit' button they should be able to update their Status to 'Activation Pending'

Now, my issue is that that in the controller of EULA Page I am not able to get the Status field on user even though it is there in my Query to update the status.

My Query is:
[SELECT Id,Status__c ,FullPhotoUrl From User WHERE Id =:userId];

But In the debug logs what I get is:
User: User:{CurrencyIsoCode=EUR, FullPhotoUrl=/profilephoto/005/F, Id=005q0000000KVGYAA4}


i.e. The Status is not being returned by Query.

I understand it could be because community users dont have access on some User object fields. In that case, is there any workaround?

Any help is appreciated.

Thanks.
ManojjenaManojjena
Hey ,In community we can not find some field value in query not only status also email  and phone value will not visible .

Could you please explain your requirment so that I can help you . We have created a formaula and get the email in other object to solve the issue .

 
theAlchemist2889theAlchemist2889
@Manoj - My Requirement is:
We have a custom field on user Named 'Status'. When the user is created their 'Status' will be inactive. Then they will go to community login (custom) page and login and go to EULA page and when they click on 'Submit' button they should be able to update their Status to 'Activation Pending'