Skip to main content
I have a situation where third part companies will be referring or subcontracting business.  These third party companies will have User logins to Salesforce.  The User will have Read/Write access to Accounts and Opportunities that they Subcontract, while only Read access to Accounts and Opportunities that they refer.  Each third party company, in addition to Users, will also have an Account.  I have set up two fields, "Referred by" and "Subcontracted by" that are lookups to Accounts.  Ideally, I would populate the appropriate field with the third party Account, and the third party Users for that Account would automatically be granted the appropriate level of access.

 

First, I'm wondering if Partner/Community licenses might be the way to go.  I'm not overly familiar with them.  But, assuming the above situation, where the third parties have full Salesforce licenses:

 

I can't get it to work because, no matter what approach I have taken, it ultimately wants a fixed string rather than a variable name of the third party Account.  This means I would be looking at a ton of individual criteria based sharing rules (which are limited to 50) that are difficult to maintain.  I would prefer to create Public Groups by the same name as the third party's Account, and then use a single rule with a variable for the name to make the assignment.

 

It's that variable that's the problem, since everything wants a fixed string.

 

Flows + Process builder seems to only work for custom objects.

 

I would prefer to avoid Apex code.

 

I am probably looking at this all wrong, since this seems like it would be a common situation, so I am definitely open to hearing, "Duh!  You're making this more complicated than it needs to be!  Do this!"

 

 
3 个回答
  1. 2019年3月30日 05:47
    Hi Steve, 

     

    First of all, it sounds like you'd want to use partner licenses instead of normal ones. Recently, Salesforce enabled the option to use sharing sets for partner users (though last I checked it's still in beta, and you need to ask SF to enable it). If you can get it enabled, then sharing sets let you define visibility rules that can work by a related account of contact, which I think should give you what you need. 
0/9000