If we have an account from SAP system, this account don't have an owner, then we insert this account into salesforce the owner will be the default owner(current operation user). In the next day, maybe the SAP system push a owner ID(Sales Rep) to this account, then we use apex code or trigger or workflow to update the standard owner field of this account. Then the SAP the assign this account to a telesales and push this relationship to salesforce, then how can I share this sales rep's account to telesales? My way is creating a sharing rule using apex code to share this account to the telesales. What's the another way to do this?
1 Answer
Sharing rules typically don't require APEX code. SR is a point&click feature for admins. To use APEX for sharing is also possible and called programmatically sharing. Just mind that these are two different approaches.
This options could work as alternatives or might even be combined
- Sharing Rules
- Programmatic Sharing with APEX
- Manual Sharing
- Account Teams