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
Christopher PettittChristopher Pettitt 

Enable Case contacts to view Cases while excluding certain case types.

In effect, there is a sharing setting on the Case object we are trying to recreate called "Grant site users access to related cases." This allows the community portal users to see cases where they are set as the contact. The problem we've run into is that our community has a global search bar and some of our case record types are for internal use only but a customer could use the global search to find these records in which they are the contact, so the sharing setting options gives too much access. So we want users to see cases where they are the contact but also limit it to certain case types. Any way to do this that anyone can think of? I can't think of a way to do it through sharing settings, but maybe an Apex Trigger or workflow rule? Any help would be great! 
SwethaSwetha (Salesforce Developers) 
HI Christopher,

Recommend reviewing below similar posts:
https://salesforce.stackexchange.com/questions/208893/restrict-search-result-by-record-type
https://salesforce.stackexchange.com/questions/138870/restrict-users-to-find-and-access-a-specific-case-record-type

If this information helps, please mark the answer as best. Thank you