Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sharing-rule]

Sharing Rules are used to make automatic exceptions to your organization-wide sharing settings for defined sets of users.

13
votes
1answer
5k views

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

If I keep two criteria based sharing rules in Account.sharingRules XML file, there is a deployment error in start line of the the second rule: sharing operation already in progress. How do we deploy ...
12
votes
1answer
2k views

Role-based sharing rules for partner community users

When dealing with role-based record sharing in a Private sharing model, I often run into a scenario where managers should see their peers' records while their subordinates should not. It's simple ...
7
votes
4answers
2k views

Cannot view Activity history

I have an activity in the Account history that was created by one user (user A) but is not visible by user B. Both Users are have the same profile and are part of the same User Group. The Account ...
6
votes
2answers
1k views

The cause of UNABLE_TO_LOCK_ROW error?

My scenario is as followed, I have a single Parent account with about 600 child accounts. Every child account has a single Opportunity with 2 or more lines. I have a monthly batch job to create ...
6
votes
1answer
2k views

Restrict Users to Find and Access a specific Case Record Type

I've created public groups and sharing rules in order to give access rights to the "Y" profile to A, B and C case record types. The user that has profile Y assigned cannot find, access and view "D" ...
5
votes
1answer
5k views

Custom Report not showing records visible to users

I understand the following: Custom Report Types must use the Role Hierarchy Reports using Role Hierarchy show all records below the current Role Sharing Rules allow records to be shared with roles ...
4
votes
2answers
92 views

Is there a typesafe way to work with rowCause?

On the project I'm currently working with, we have Apex Sharing Rules. I see we are passing rowCause as a String everywhere. But the values of these Strings look like API names. Is there a typesafe ...
4
votes
1answer
56 views

How to - Allow only one set of people to view certain type of Cases

I have a scenario: Lets say there are 2 groups of users in the same profile ( Group A And group B). And there are 2 types of Cases - A and B(other Cases). What I want : There is no restriction ...
4
votes
0answers
54 views

Sharing rules is created but not working on scratch org

I recently try to create a sharing rules on a custom object in a scratch org. Custom object: Foo__c Field: only the default name field. Foo Sharing Settings: Default Internal Access: Private ...
3
votes
1answer
135 views

How can we maintain access to the creator a Case at all times, even when its owner has been changed to Queue

I had written a Workflow rule based on which a case gets auto-assigned to a "Customer Service Representative" queue. Now the problem is that as soon as the case is created, the creator gets ...
3
votes
1answer
170 views

Apex Managed Sharing Records

In Earlier release, we have given record access via apex managed sharing. In new release we have removed the apex managed sharing, in place we have used object sharing rules. My question is during ...
3
votes
1answer
143 views

Unable to overcome INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY

I'm writing a test class for some trigger functionality and I keep getting the below error when attempting to insert a Case as a User with a specific Profile/Role/Department. ...
3
votes
1answer
142 views

Community Sharing and Visibility

I am working on a very basic community use case and need some guidance for sharing setup. Share Cases with Contacts within the same Account, what's the best option to achieve the sharing? Setup ...
2
votes
2answers
881 views

Sharing rules not working on Partner Community Users

I have partner community enabled. I want to display Account, Contact and Opportunity records to the Community users only if they fulfill particular criteria. What I've already done is as follows : ...
2
votes
1answer
575 views

Sharing rules and Inner classes

If I have 2 classes, Class A and class B. Class B has an inner class called Class C. Class A calls class C. My question is whether class c enforces sharing rules or not. Public with sharing class a{ ...
2
votes
1answer
78 views

community plus user with sharing rule read/write on contact soqls running longer in winter 19

I need help in resolving the below issue. I have a community plus user. The user is part of public group and the group has read/write access to all contact records and read access to account records ...
2
votes
1answer
57 views

How to Activity Access Levels work in SF. When you set “Controlled by Parent” to Activities

I have imported 2 organizations(Account(type- abc, xyz) & events) data into one production organization.And created two users (salesforce platform license) called A, B and set the OWD is priavte ...
2
votes
1answer
233 views

Use APEX to give users Sharing Access to a custom object

I'm trying to find out how to programmatically create a Sharing Access Rule for a custom object when an event occurs. For example, I have a Community active with some Portal users. Whenever one of ...
2
votes
1answer
112 views

When to use Groups and when Roles

We are building a solution using service cloud console which will be used by multiple customers. One org will have data in various objects like accounts, contacts, cases and some custom objects for ...
2
votes
1answer
157 views

How to Hide Calendar/Activity Details by user wise?

I have imported A,B,C,D User Event details in Admin User. those all user events are Showing in admin calendar view. like below Image. How can i see particular users details in separate tab like ...
2
votes
0answers
38 views

insufficient access rights on cross-reference id while deploy sharing rules

Getting the error while on deploy package with sharing rules. ... <sharingCriteriaRules> <fullName>Access_Refund_UK_Supervisor_UK</fullName> <accessLevel>Edit</...
2
votes
1answer
226 views

Contact Sharing Rules - No Account

When a contact does not have an account assigned, it is not visible to users, even if there is a contact sharing rule active that shares the contact to their role. As as admin, I have looked at the ...
2
votes
1answer
388 views

How to give the access to show all calendar events in admin user side in salesforce?

I created calendar event through admin side, It will be showing standard calendar events. Now I created another event through User A, He is standard user profile. But my doubt is User A already ...
2
votes
1answer
226 views

Changing Lead Ownership for Siblings in Role Hierarchy

I have 2 roles in my org: A & B. They users assigned to the role A have permissions to 'Create/View/Edit the Lead object as well as permission to 'Transfer Leads' and 'Transfer Records'. A and B ...
2
votes
0answers
928 views

Let community user download attachments linked to his contact

During enrollment process our community user signs some documents/agreements which are saved as attachments on contact object (community contact representing the current user). And now on community ...
2
votes
1answer
468 views

Issue with creating Sharing rule using Spring'15 Metadata API version 33.0

Has anyone tried creating Sharing rule using Spring'15 Metadata API version 33.0? I want to create an owner based sharing rule using metadata and below is the code snippet method which is calling "...
1
vote
2answers
39 views

User unable to edit created Contract

OWD for Account and Contract is Public Read-Only. As we know that Account and Contract have Master-Detail relationship. Whenever a user creates Contract record the owner of the record is being ...
1
vote
2answers
140 views

Efficient way to set up roles and hierarchies using APEX [closed]

I have this complex sharing structure where I have multiple levels of users and want to be able to dynamically assign/update sharing to records for different users. For example, let's say I have 20 ...
1
vote
1answer
362 views

OWD and Sharing Rule scenario with Role Hirerachy

I was doing some workbook and came across below scenario. I have created a Custom Object called Position. I have set the OWD as Private for custom object Position and setup a Role Hierarchy where ...
1
vote
1answer
31 views

Enable users to change the owner of a case that does not belong to them

I have an org in which a profile had a sharing setting on the cases that permit the users to see and modify all cases (not only the ones they own). The profile have the rights to read, create, modify ...
1
vote
1answer
35 views

best practices around Account sharing?

this question might sound silly but it's around best practices and performance and security.. What is the best way to sharing account Internal Sharing... 1. OWD -- Public or 2. OWD - private ...
1
vote
2answers
508 views

Does ownership based sharing rule also shares records of users' subordinates?

Sales Manager A has subordinates A1, A2. Sales Manager B has subordinates B1, B2. Using ownership based sharing rule, records owned by A are shard with B. Does it also share records owned by A1 and ...
1
vote
2answers
66 views

How to allow edit access to for certain record types only

I need all user to be able to see all opportunities. However, Department A should only be able to edit opportunities assigned to 3 record types (x,y,z) and Department B should only be able to edit ...
1
vote
1answer
115 views

Give access to Roles and Subordinates for already exsisting cases

I have Case and its Child Transaction-1 and Transaction-2. Transaction-1 and Transaction-2 has lookup relationship to Case. Case, Transaction-1 and Transaction-2 OWD is Private. In Prod box, I have ...
1
vote
2answers
408 views

Setting View All Access for Customer Community Plus User

My org has External Sharing Model enabled. It has Custom object with Default External Access set to Private. Now I need that custom object to be shared with (read access) all users in specific ...
1
vote
1answer
995 views

Sharing Rule based on lookup field

I am attempting to create a Sharing Rule which will simply share a record with whomever is in a certain User lookup field on the record. What is the best way to do this ?
1
vote
1answer
6k views

how many sharing rules can we create at maximum on standard object in salesforce

As we all known that we can create 300 Sharing Rules (Both Owner- and Criteria-based) and 50 Sharing Rules (Criteria-based Only) on Custom object. could you please tell anyone how many sharing rules ...
1
vote
1answer
46 views

Sharing of a junction object

What access would a junction object have if one master object has read-write access while the other master object has read access through the sharing rules with organization-wide defaults private for ...
1
vote
1answer
131 views

Lead sharing rule

Lead - users at the same role level need access to each others Leads I have users at the same level in the role hierarchy that need to read/write each others Leads. How do I set this up in the ...
1
vote
1answer
295 views

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

I'm just curious to know that when I create a sharing rule for account via sharing settings. I want to know on which object the sharing rule record is getting stored when I create the sharing rule for ...
1
vote
1answer
512 views

Share Child Record When parent record is shared

I have two Object Let's say Object A and Object B, Both are related with Lookup relationship, and Both are set to Private In OWD setting. Now When I share parent record I would like to share all it'...
1
vote
1answer
138 views

INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY in Many to Many

I have Accounts and Contacts as M:M in the system and a simple apex code that creates junction objects. @RemoteAction global static Boolean addContacts(String[] arr, String acc_id){ if(...
1
vote
1answer
230 views

How can I share certain records of a custom object with my community's guest users?

I am using a criteria-based sharing rule to share my custom object with internal users and registered users of my Community. I would now like to add a rule to share with guest users of the Community. ...
1
vote
0answers
15 views

Account sharing rules based on province/state code

I have a criteria based sharing rule that is supposed to provide access to a group of users based on the shipping province/state code of the accounts. <?xml version="1.0" encoding="UTF-8"?> &...
1
vote
1answer
164 views

Contacts visibility to site guest user

My site guest user needs access for all the contacts in the instance. Right now site guest users can access contacts created by guest user. They are not able to access contacts created by Salesforce ...
1
vote
0answers
148 views

Override Standard “Insufficient Access rights” Message with custom error

I'm trying to override the standard "* insufficient access rights on object id" error message for users who do not have "write" access to records. I'd like to change the message for better UI ...
1
vote
1answer
44 views

Record sharing model

Whats the best way to do this.... I have ManagerA who is owner of all accounts... ManagerA would like to share some of his accounts with RepB and some accounts with RepC. RepB and RepC should NOT ...
1
vote
0answers
67 views

Unable to create sharing rules on custom object

I am unable to create sharing rule for any custom object on my app. I have checked the following: The user has system administrator privileges The app has sharing option checked The object is not a ...
1
vote
1answer
91 views

Partner and Customer community contact record visability

I have both Partner and Customer Community users. I have a Contact record owned by a Customer Community user which is not visible to the Partner user (which created this Contact) - an "Insufficient ...
1
vote
1answer
65 views

Question on Security setup Accounts/Opportunities. Users read access to Account prevent from creating Opportuntiies?

I thought I had a pretty good handle on security in SF. Have received a requirement that I can't seem to meet with no code. Basically OWD - Accounts, Contacts and Opportunities are all Private. ...