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
Vijay sai Mahajan 5Vijay sai Mahajan 5 

Unable to retrive rows from SOQL

I have a guest user assigned to a profile. External access is set to read/write and object permissions are given as read/create, sharing rule is defined as read those records created by that user Id, Apex class access is also given unable to retrieve rows when doing an action.
ShivankurShivankur (Salesforce Developers) 
Hi Vijay,

It might be possible that the user don't have any records that are created by the guest user and so it could return 0 results.

If the issue is with access then it would result in some error line related to access, but since you have already provided relevant access to the user profile it shoudl return the results for it.

Check out below thread as reference:
https://developer.salesforce.com/forums/?id=906F0000000BJC2IAO

Hope above information helps. Please mark as Best Answer so that it can help others in future.

Thanks.