Skip to main content
18 votes
Accepted

How to deploy more than one sharing rule in one deployment?

You can ask support to enable a feature called Defer Sharing Calculations. That way, you can suspend sharing rule calculations to not have them run immediately after you have deployed them, but at a ...
Robin De Bondt's user avatar
5 votes

Restrict Users to Find and Access a specific Case Record Type

You can't really restrict access to view records based on record types from the profile level. if you think of Salesforce as a filing cabinet, each drawer is an object, within the drawer there are ...
Dan Wooding's user avatar
  • 3,538
4 votes
Accepted

Criteria-based sharing rules don't work when record is owned by Automated Process User

This appears to be a Known Issue When you click the Sharing button On a record owned by Automated Process, you see one entry for License Manager. Expanding License Manager you get all the users with ...
cropredy's user avatar
  • 71.5k
3 votes
Accepted

When Does Sharing Rule execute?

The Criteria based sharing rules run synchronously as documented but the actual share records are created asynchronously. This is not publicly documented yet but you can easily see in transaction logs ...
Mohith Shrivastava's user avatar
3 votes
Accepted

How to allow edit access to for certain record types only

Edit is a CRUD permission on the Object, in this case Opportunity, defined on profile/permission set level. So as long as a User on say Profile A has Edit rights on Opportunity, they will always be ...
Jayant Das's user avatar
  • 30.6k
3 votes
Accepted

Efficient way to set up roles and hierarchies using APEX

I have encountered this exact challenge before. The simplest approach I've found is to do the following: Create a Public Group for each Territory/Zone Assign users to their relevant Public Groups ...
Matthew McKinley's user avatar
2 votes

Efficient way to set up roles and hierarchies using APEX

Territory Management sounds like the feature you're looking for. Try this in a sandbox or developer edition first, of course. Roles are for a more traditional approach where a user has a defined place ...
sfdcfox's user avatar
  • 491k
2 votes

Apex bulk sharing Batch class

It think it is provided in the documentation link that you have mentioned, in the end. An Apex class used for recalculation must be associated with a custom object. To associate an Apex managed ...
manjit5190's user avatar
  • 8,033
2 votes

Which field types are supported for salesforce sharing rule?

Oh, it is on the parent page https://help.salesforce.com/s/articleView?id=sf.security_sharing_rule_types.htm&type=5 You can create criteria-based sharing rules for accounts, assets, campaigns, ...
Patlatus's user avatar
  • 16.8k
2 votes
Accepted

Testing Sharing settings and record visibility in Apex - No Records found

According to the below help article, Criteria-based sharing rules cannot be tested via Apex: https://help.salesforce.com/s/articleView?id=sf.security_sharing_rule_types.htm&type=5
BenBates's user avatar
  • 211
1 vote

Campaign Member Sharing Rules

A CampaignMember is a junction object between a Campaign and a member (lead or contact). The CampaignMember sharing settings are controlled by the related Campaign's record much like a master-detail. ...
Wes Lyons's user avatar
  • 336
1 vote

Enterprise territory management vs Sharing rule

I have implemented territory management to replace role-based sharing in an instance with about 2 million accounts. It seems to be working OK. In terms of account assignment rules, it's very ...
David Cheng's user avatar
  • 7,085
1 vote

Need to Share record with Subordinate

Use Sharing Sets for communities. It is possible to use Sharing Rules as well.
Patlatus's user avatar
  • 16.8k
1 vote

Salesforce Report Visibility Customization

I was successful in resolving this issue using a custom formula field value. I made it result 1 if C=D and 0 if not...based on this value I created the report filter, thanks for all the suggestions by ...
Aishik Banerjee's user avatar
1 vote
Accepted

Sharing settings with criteria based assignment rules not working as expected

You have several things at play here: Sharing Settings OWD and Criteria-based sharing rules determine record viz and basic r/w but otherwise say nothing about any specific fields available for ...
cropredy's user avatar
  • 71.5k
1 vote

Remove access to Account Records having record type "Partner", for a particular role

You need to do several things OWD Private on Account (as you suggested) Remove View All/Modify All on Account from any user's profile or permission set(s) that would access Accounts with recordtype = ...
cropredy's user avatar
  • 71.5k
1 vote
Accepted

What will happen to sharing if 'View All' is removed from Profile?

What will happen to sharing if 'View All' is removed from Profile? If you remove this permission and keep the object at Public Read/Write, given the object permission is still granted (CRUD) all ...
TSmith's user avatar
  • 5,002
1 vote

How to allow edit access to for certain record types only

If you users have same profile then you cant use page-layouts-profile trick to hide edit button then you have to restrict update using Validation Rule. AND ($UserRole.Name =='Department A' , ...
Pranay Jaiswal's user avatar
1 vote

Sharing Rule is not granting access to a public group

Sharing is not used for giving access to read/edit object but specific record. In your case you probably should create permission set for people that would be able Create, Edit, Delete Libraries and ...
user1974566's user avatar
  • 2,315
1 vote
Accepted

Restrict record access based on record type

The record owner is automatically granted Full Access, allowing them to view, edit, transfer, share, and delete the record https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/...
Eric's user avatar
  • 54.2k
1 vote

Sharing Rules - Markers On User Record To Control Visibility

I think that this can be solved by doing the following: Create a Public Group. Create a CheckBox on the Account with name:"XYZ" Create the same CheckBox on the User page layout. Create ...
Carlos Naranjo's user avatar
1 vote

Creating sharing rules through apex not manual sharing

Not really. It's theoretically possible to do so, but not even Financialforce's MDAPI supports SharingRule. You would have to spend a significant amount of effort. For custom objects, you can use Apex ...
sfdcfox's user avatar
  • 491k
1 vote
Accepted

object api name on where sharing rules of account object gets stored

Sharing rules are usually present in the metadata .So metadata API will have definitions of your rule . Salesforce recommends to use this for all updates to sharing rules . However under the hood ...
Mohith Shrivastava's user avatar
1 vote

Share Child Record When parent record is shared

There are couple of ways you can do the sharing on child records, Manual Sharing Apex Sharing - Create a custom button on Master Object. On click of that button query the child record and used the ...
Devendra's user avatar
  • 5,075
1 vote

In what part of execution order are Owner Based Sharing rules evaluated?

Since they are owner based, they don't have to be evalated during the sequence. Criteria based however, are evaluated since the criteria need to be revisited for evaluating the sharing. PS: I think by ...
Agent47's user avatar
  • 35

Only top scored, non community-wiki answers of a minimum length are eligible