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
balaji Jayararmanbalaji Jayararman 

Read and create permission set at object level for guest user profile. but not getting records in apex class. Any work around for this?

As per winter 21 release notes, view all and modify all permissions are removed at object level for guest user profile.

In my case, i have apex class with sharing mode enabled and gave read and create permission for custom object(Technologies__c) for guest user profile. But no Technologies__c records are retrieved.

if i give view all permission for custom object(Technologies__c) for guest user profile. I see Technologies__c records are rerieved. Any work around for retreiving the records by giving read and create permission alone at object level for guest user profile?
Best Answer chosen by balaji Jayararman
AbhishekAbhishek (Salesforce Developers) 
With the Winter ’21 release, Salesforce is disabling the View All Data, Modify All Data, edit, and delete object permissions for guest users in existing Org's. These permissions are removed from Org's created in Winter ’21 and later. For existing orgs, reduce object permissions for guest users if they have View All Data, Modify All Data, edit, or delete permissions on a standard or custom object.

>> Release Note:

-- https://releasenotes.docs.salesforce.com/en-us/winter21/release-notes/rn_networks_reduce_object_perms.htm

It means that now you can be granted Read-Only access to records only through guest user sharing rules. If you have given read access on profile then it would not work.

Here are reference article for your reference:-

-- https://help.salesforce.com/articleView?id=networks_secure_guest_user_sharing.htm&type=5

-- https://help.salesforce.com/articleView?id=000352282&language=en_US&mode=1&type=1


Thanks

All Answers

RituSharmaRituSharma
You may share records with guest users using sharing rules. Refer this URL for details:

https://help.salesforce.com/articleView?id=ls_guest_sharing_criteria.htm&type=5
AbhishekAbhishek (Salesforce Developers) 
With the Winter ’21 release, Salesforce is disabling the View All Data, Modify All Data, edit, and delete object permissions for guest users in existing Org's. These permissions are removed from Org's created in Winter ’21 and later. For existing orgs, reduce object permissions for guest users if they have View All Data, Modify All Data, edit, or delete permissions on a standard or custom object.

>> Release Note:

-- https://releasenotes.docs.salesforce.com/en-us/winter21/release-notes/rn_networks_reduce_object_perms.htm

It means that now you can be granted Read-Only access to records only through guest user sharing rules. If you have given read access on profile then it would not work.

Here are reference article for your reference:-

-- https://help.salesforce.com/articleView?id=networks_secure_guest_user_sharing.htm&type=5

-- https://help.salesforce.com/articleView?id=000352282&language=en_US&mode=1&type=1


Thanks
This was selected as the best answer