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
Walter@AdicioWalter@Adicio 

Question about 'Sharing a Record Using Apex'

This article in the apex code language reference talks about sharing programmatically.

 

Can I use this to make it so a customer portal user can see cases that are related to an account that the customer portal user is not directly related to?

 

Thank you.

Best Answer chosen by Admin (Salesforce Developers) 
MarkSilberMarkSilber
Depending on your use case and how many different combinations of accounts and customer portal users you need to manage, you might be able to do this with Case Teams. If you only have a few customer portal users that need to see different accounts, you can setup pre-defined case teams and use Assignment Rules to set the associated team.

All Answers

HarmpieHarmpie
That should be possible, provided you find a good hook to insert some APEX to do the sharing.
MarkSilberMarkSilber
Depending on your use case and how many different combinations of accounts and customer portal users you need to manage, you might be able to do this with Case Teams. If you only have a few customer portal users that need to see different accounts, you can setup pre-defined case teams and use Assignment Rules to set the associated team.
This was selected as the best answer
Walter@AdicioWalter@Adicio

Thank you for the info, predefined case teams do work as well as account sharing rules, but account sharing rules can not share to a contact, so the prefedined case team is a solution if you only have the self-service portal  instead of the customer portal.

 

I promoted your idea harm. 

MarkSilberMarkSilber
Pre-defined Case Teams can contain Customer Portal users -- we are using this in production.
Walter@AdicioWalter@Adicio

Yes you are right, I meant account sharing is not a solution if you only have self service. Predefined case teams are a solution to my problem for self service portal and customer portal. Right now we only have selft service portal and are setting up the customer portal. So until the customer portal is implemented I can only use predefined case teams to share cases for multiple accounts to my self service contacts.

 

Thanks again! 

Walter@AdicioWalter@Adicio

Hello Mark,

 

When 'case teams' were released from what I could read it sounded as if I had already setup the same thing with queues and public groups. I didnt think it was an improvement to switch that setup over to case teams, because I couldn't find benifits over what was already working. I started using queues and public groups with assignment rules to meet our business requirement that multiple users need be informed of case activity. I had some questions I was hoping you could comment on.

 

With case teams in production can you tell me a little bit about how 'case teams' are being used in your Org?

 

We have been using assignment rules to give case ownership to different 'queues' and we have 'public groups' assigned to queues and users go into the public groups. This makes up "support team 1", "support team 2" for example. Different workflow updates, alerts and tasks are triggered to queue members for new cases or case edits, e-mails, events, tasks, and with some users we jave assignment rules giving case ownership directly to their user account.

 

What are the benifits to using case teams over queues to do what I already do in my Org with queues?

 

Is it that there are benifits in other areas, and if already using queues for what I mentioned above, switching to case teams for that purpose is not an improvement?

 

One benifit I see is that you can add regular 'contacts' to case teams, and contacts can not be added to public groups or queues. So if only using the self service portal you can allow viewing cases from multiple accounts to a contact with case teams. However if using the customer portal you can use 'account sharing' to acheive the same result and would not need case teams for that purpose. So still looking for benifits.

 

I also cant find a way that you can workflow-rule_alert to case team members, so these users are informed of case activity in the SF setup UI, but is this something you are doing with Apex and Triggers?

 

How are the cases users own monitored? how are these users notified?

 

Thank you.