1

Is the Email field in the User object hidden from customer community users? My client has customer community and has written an application for the community. There is an Apex class "with sharing" that selects various fields from the User object. When a community user accesses this method, all field values are returned except for the Email field, which returns a null value.

When a standard license user performs the same function, the email value is returned.

Portal User Visibility and Community User Visibility is enabled. There is a sharing rule on the User object and all the community users are in the group.

0

For community users, there are 3 levels of visibility for their data fields: Employee, External, Public.

https://help.salesforce.com/apex/HTViewHelpDoc?id=networks_contact_info_visibility.htm&language=en

These can be set in the API using fields such as UserPreferencesShowEmailToExternalUsers, etc.

| improve this answer | |
  • Also, if the Apex class uses without sharing, then the Email will always be visible. – David Cheng Nov 15 '15 at 18:56

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.