1

I was trying to test sharing rules on a custom object: Record_For_Sharing__c

The object's organisation-wide default sharing setting is private for both external and internal users.

I added a sharing rule based on the owner:

From: Roles -> SomeRole
To: Public Group -> All Internal Users

And then created records from a user with the role "SomeRole"

The problem is that when creating a record, either manually or from sfdx, no internal users have access to the record. This was tried with users with licences "Salesforce" and "Salesforce Platform"

Also, the correct entries are created in the Record_For_Sharing__Share table.

When doing the same on a developer org, internal users do have access to the records.

Is this a known bug or is there something I am missing?

Thanks!

  • The default scratch org user doesn't have a Role. Did you assign the Role to your user before testing? – David Reed Aug 8 '19 at 21:18
  • Yes, each user has a custom role. – Felix Pelletier Aug 12 '19 at 13:35
1

Not sure if you got the answer you needed but this was confirmed to be a bug by SF.

Here's the link.

https://success.salesforce.com/issues_view?id=a1p3A0000003dTYQAY

Another sample scenario is if you create a list view and share with internal users. It won't work either.

No ETA as per latest update. Workaround given is create a new public group with internal users on it or role.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.