[SalesForce] Restrict Search result by record type.

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?

Best Answer

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.