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
Chris VogeChris Voge 

Application not working correctly due to Role not being defined on a specific user

Hello,

We have a customer service application where customer reps start from
a customer search page and help customers with various needs. SOQL queries are
executed to retrieve the data during a search.

I was logged in as a rep doing a search and kept getting "No Results Found".
I had been logged in as other reps and performed the exact same search and
had gotten results from the search just fine.

Long story short. I noticed on the troubled user that they did not have a user
role defined. After setting the role, the search worked fine.

Can anyone tell me why a lack of a user role would affect the application
like this ? Let me know if need more specific information.

Thanks, Chris 
Best Answer chosen by Chris Voge
Prabhat Kumar12Prabhat Kumar12

As per documentation if particular object has enable "​Grant Access Using Hierarchies" then record will be displayed based on role heirachy. 

This is the reason you need to assign role to user.
 

All Answers

Prabhat Kumar12Prabhat Kumar12

As per documentation if particular object has enable "​Grant Access Using Hierarchies" then record will be displayed based on role heirachy. 

This is the reason you need to assign role to user.
 

This was selected as the best answer
Chris VogeChris Voge
Thanks for the quick reply. Very helpful.