0

I have a custom object "customObject" with OWD public read/write. I need certain users to access certain records of this such object. I created fields:

User.ConfidentialAccess -- checkbox.

customObject.Confidential -- checkbox.

And I created an active restriction rule:

User.ConfidentialAccess = true

customObject.Confidential = true

Is there anything wrong with this definition? Am I misunderstanding the concept of restriction rules?

(EDIT) Thank you, Callum: I am adding the behavior resulting after activating the restriction rule: all users see all records... and this is why I say the restriction rule is not working.

I need the user with the ConfidentialAccess checkbox = true to be able to access the record with the Confidential checkbox = true.

On the other hand, the user with ConfidentialAccess = false to be able to access any records EXCEPT the records with Confidential = true.

Thx!

4
  • 1
    Hi, it would be great to understand what you mean by 'not working'. I'm assuming that it means that users with the ConfidentialAccess = true can't see records? Commented Jul 22 at 18:54
  • I just edited the question. I need user.ConfidentialAccess=false to be UNABLE to access records with confidential=true. Commented Jul 22 at 18:59
  • That does look like it should be working, it almost fits the scenario for using custom fields detailed here: help.salesforce.com/s/…. The only consideration would be checking that there isn't another Restriction Rule evaluating to true for the same users. Commented Jul 22 at 19:27
  • Actually, that's the first restriction rule I created... ChatGPT said I should review the "Modify all data" and "View all data" values in the object OWD (and any permission sets)... I'm checking on that too. Commented Jul 22 at 19:38

1 Answer 1

1

Do User.ConfidentialAccess = false

customObject.Confidential = false

It will work for sure

As we are restricting we do restricting non confidential users to non confidential records

1
  • Actually, I tried and it did. It's all math. The proper answer was to restrict false "confidential" records to false "confidential access" users Commented Jul 23 at 5:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .