You need to sign in to do that
Don't have an account?
Frank Chen
Same SOQL , but some user can't get data returned
Hi all,
I got a problem, there is a SOQL select Name from User where Name = 'records edit'
In the same environment, person A can get data via this query, but person B can't.
The profile and permission set is same for the two person.
Do you know the reason for this problem?
Thanks
1. Run your class in without sharing mode
public without sharing class Controller {}
2. Add user's role to access data.
3. Share data with Person B
All Answers
1. Run your class in without sharing mode
public without sharing class Controller {}
2. Add user's role to access data.
3. Share data with Person B
Hi Bhawani
Thanks for your reply, the reason for this problem is for users whose locale is English the user's name is 'records edit', but for users whose locale is China the user's name change to 'edit records'.
So Chinese user will never get data via this query.
This will not be dependent on user locale.