0

I want to be able to restrict search result of an object by assigned record type. for example XYZ profile should only be able to see records from XYZ1 record type and ABC profile should only be able to see records form ABC1 record type. I have assigned appropriate record type to each profile. XYZ1 --> XYZ and ABC1 to --> ABC. Now when they create records for that custom object records goes to the correct record type.

Is there any way I can restrict there read access based on record type? So that they can only read records for the specific record type?

2

Directly speaking, no. Record Types are used to specialize records to show different fields and picklist values for picklist fields. Record Types cannot explicitly allow or prevent showing records to a user. What you can do, though, is set the custom object's Organization Wide Defaults to Private, and then create two criteria-based sharing rules to share the records. Note that the role heirarchy, ownership, implicit sharing, and other sharing mechanisms may still expose records to users as well.

  • Thank you for answering this . So I set Sharing setting as Private for that object. And I also created 2 sharing rules for XYZ1 and ABC1 record type. And selected shared with Roles and Subordinates. As a XYZ1 profile user I can still access ABC1 records. In search result and in list views – Aman Feb 20 '18 at 16:29
  • @Aman If they're in the same part of the role hierarchy, then they'd be able to see each other records. You might want to check out the sharing trailhead. – sfdcfox Feb 20 '18 at 17:00
  • Thanks Aman that makes sense. Looks like for better security it is recommended to create separate object rather than record type. – Aman Feb 20 '18 at 17:04

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.