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
Jake JeonJake Jeon 

How do I bring all the events regardless of user's role

Hi All,

I'm having trouble bringing all the events users create.
As I understand, Once I settled role hierarchy, low-level role couldn't access its superior's data.
Even though I query all the events, it's affected by the role setting. (unable to show all the events to low-level role user)
In case of this situation, How do I make it able to show all the events?

Please let me know if my explanation is not enough to understand.

Thanks for your help in advance.
Best Answer chosen by Jake Jeon
Adilson Arcoverde JrAdilson Arcoverde Jr
Hi Jake,

If you are implementing a controller, for instance, you could use public without sharing <<YOUR_CLASS_NAME>>. Withou Sharing will override your organization OWD.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Regards.