You need to sign in to do that
Don't have an account?
michaelw_dc
VisualForce Page not listing accounts on Site
This used to work at one point, and now it does not. I've observed that the VisualForce page still lists accounts correctly, but when published to a "Site" homepage, it does not. This suggests a permissions problem, but I don't see anything standing out as incorrect.
This entire process of producing the accounts seems to consist of: a user, a user profile, a visualForce page, a custom Apex class that sets the page size to 2000, and the site page itself.
This entire process of producing the accounts seems to consist of: a user, a user profile, a visualForce page, a custom Apex class that sets the page size to 2000, and the site page itself.
- For the custom Apex class, I've verified that the user profile is enabled for it in the security settings.
- For the Visualforce page, it works perfectly, listing out all the accounts.
- For the user profile, I've verified that the object settings includes Read permission on the Accounts object, and possesses the Apex Class Access to the custom Apex class.
- For the site page, editing public access settings takes me to the same user profile that possesses Read permission on the Accounts object.
- For the user itself, it possesses the guest license and uses the profile with the Read permission on the accounts object.
Did you check the Spring 20' realease notes on guest user access to records using sharing settings. https://releasenotes.docs.salesforce.com/en-us/spring20/release-notes/rn_networks_guest_sharing_security_alert.htm
By default Org's guest user record access is set to private. For the site to display records for guest users trying enabling the checkbox and setup sharing rules for the user on desired object.
Step1. As shown in the image below navigate to sharing settings and enable the checkbox
Step 2. Create a new sharing rule on Account object like below using Guest user based criteria. (Ex: Accont name not equal to NULL)
Hope this helps! Please mark as best if it solves your issue
Thanks
All Answers
Would you change your apex class to without sharing to see if accounts listed on site?
Did you check the Spring 20' realease notes on guest user access to records using sharing settings. https://releasenotes.docs.salesforce.com/en-us/spring20/release-notes/rn_networks_guest_sharing_security_alert.htm
By default Org's guest user record access is set to private. For the site to display records for guest users trying enabling the checkbox and setup sharing rules for the user on desired object.
Step1. As shown in the image below navigate to sharing settings and enable the checkbox
Step 2. Create a new sharing rule on Account object like below using Guest user based criteria. (Ex: Accont name not equal to NULL)
Hope this helps! Please mark as best if it solves your issue
Thanks