Find your content:

Search form

You are here

Sharing with all the users of a profile

 
Share

I want to share all the records of a custom object created by customer portal users with all the users of a particular profile. As of now, org-wide-setting of the object is private. Any thoughts?


Attribution to: doga

Possible Suggestion/Solution #1

I think there are two more custom options that will make automagically adding customer portal profile users to a public group a little easier rather than having to one-off add these users to the group:

  1. Create an apex trigger on user that evaluates the user's profile and if it's a targeted customer portal profile, automatically add the user to the customer portal public group member object. Conversely, if the user's profile is changed to a non-target customer portal profile, then remove them from the public group member object.

  2. Create an apex trigger on the target custom object that does a query on the record owner's profile and if it's the customer portal profile, automatically add a manual share using apex managed shares functionality. However, if the record ownership changes, this will delete all manual shares against the record.


Attribution to: Adam Torman

Possible Suggestion/Solution #2

Create a public group comprising of the Users you want to share to. Create a (ownership based) sharing rule, from Roles (Portal User Role) with the Public Group you've created as Read / ReadWrite.


Attribution to: techtrekker

Possible Suggestion/Solution #3

The sharing rules provided in the interface have two options; based on record owner or criteria.

Option 1: If you select based on record owner you can filter on Public Groups and Roles, which is what I would recommend trying out. If you can assign all of your portal users to a known set of Roles you could then create a new Public Group (My Name->Setup->Administration Setup->Manage Users->Public Groups) consisting of these Roles and then base your sharing rule on it.

Option 2: The other option, based on criteria, might work if you can take advantage of Record Types. If all of these objects created by your portal users have the same Record Type you could share them based on that.


Attribution to: Mike Chale
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/4844

My Block Status

My Block Content