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
DixitSDixitS 

Does without sharing class can ignore the enable of Secure guest user record access over force.com sites?

After secure guest user record access, We are using force.com sites to access and update the account records. We using the VF page extension class(without sharing keyword) to update the account record. Does without sharing class can ignore the Secure guest user record access?
Best Answer chosen by DixitS
VinayVinay (Salesforce Developers) 
Hi Dixit,

Yes you can ignore,  Secure guest user has nothing related to classes.
However do you see any error message? If you see any error please share.

If no then you can ignore.

Also you can review more details on release notes.

https://releasenotes.docs.salesforce.com/en-us/winter20/release-notes/rn_networks_guest_user.htm

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar

All Answers

VinayVinay (Salesforce Developers) 
Hi Dixit,

Yes you can ignore,  Secure guest user has nothing related to classes.
However do you see any error message? If you see any error please share.

If no then you can ignore.

Also you can review more details on release notes.

https://releasenotes.docs.salesforce.com/en-us/winter20/release-notes/rn_networks_guest_user.htm

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar
This was selected as the best answer
DixitSDixitS
Hi Vinay,
Thanks for your response. I am not getting any error, it is working as expected. will it create any issue in the future? was my worry actually.
VinayVinay (Salesforce Developers) 
Hi Dixit,

Thanks for update.

The overall recommendation and best practice is to address “Read” and “Create” needs with the permissions on the Guest User Profile, record read visibility via Guest User Sharing Rules, and Edits by Apex methods residing in classes running in without sharing mode.

Please mark as Best Answer if ther above information was helpful so that it can help others in the future.

Thanks,
Vinay