Questions tagged [sharing-rule]

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

0
votes
1answer
200 views

Restrict Search result by record type.

I want to be able to restrict search result of an object by assigned record type. for example XYZ profile should only be able to see records from XYZ1 record type and ABC profile should only be able ...
0
votes
1answer
19 views

Adding a custom button and sharing records

I am having a problem implementing a requirement. I have an object called Credentials and this credential object have two fields name and password. Now, the requirement is, a user called Manager ...
0
votes
1answer
439 views

how to share a record to particular user

there is a lookup field with User object UserLookup__c : when the field is not empty , share that particular record to selected user in the lookup field. how can we achieve this 1. I think we can ...
0
votes
1answer
57 views

Display users related to territory on Account

I have 2 standard objects, Accounts and Users and the Territory object. Accounts and Users have a lookup to the Territory. I need to display the user only accounts from his territory. How correctly to ...
0
votes
1answer
127 views

When Roles & Subordinates category will be visible in Public group

Based on Salesforce documents Roles and Subordinates category contains partner portal and Customer Portal roles that contain users with a portal license type. But in my org, once the community is ...
1
vote
2answers
419 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 ...
0
votes
1answer
289 views

How do I share a User's records with its subordinates?

I have a use case where the default sharing for an Object is set to "Private". When a user creates a new record, however, they want their subordinates to be able to work with it as well. It's a ...
3
votes
1answer
143 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 ...
0
votes
1answer
27 views

share record depend upon field value

I have one custom object, in that one field named as 'status' - pick list value. my requirement is - when the status field goes to 'assigned',all profiles in org can able to see the record.if the pick ...
2
votes
2answers
898 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 : ...
0
votes
0answers
116 views

Impact of validation of package.xml having Sharing Rule

I am planning to deploy few sharing rules on Account, Contact object from UAT to PROD through package.xml. Before actual deployment, I would like to just validate the package against production ...
0
votes
2answers
27 views

Edit access - 2 profiles

I have 2 profiles A and B. Both have same access on Account object and have same permission sets. profile A cannot edit the account but profile B can. What could be causing this? anything I am missing ...
2
votes
1answer
237 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 ...
0
votes
0answers
55 views

Sharing rule for report content

I want to show a report to external community user. I created a report in SF admin side and then exposed it on the community portal. But the report shows all the records. I only want the external ...
1
vote
2answers
522 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
votes
1answer
253 views

Deferred Sharing mode?

What is deferred sharing mode in salesforce ? will the sharing rules work when the deferred sharing mode is on ? I observe that the sharing rules don't work when the deferred sharing mode is on and ...
0
votes
1answer
2k views

Restrict record access based on record type

We have requirement : For Operations profile -- we want them to not see any Opportunity Record Type = Grant; or Opportunity Record Type = Report. So regarding that requirement we have did ...
1
vote
2answers
141 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
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 ...
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 ...
3
votes
1answer
143 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 ...
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 ...
0
votes
2answers
421 views

How does getSObjectType().getDescribe() work in a 'Without Sharing' Class?

I recently run into a problem when I try to check fls within an without sharing class. Here is what I did: For the user profile I set CustomObject__c allow delete permission to "False" public ...
0
votes
0answers
2k views

Sharing Rules for Activities

Why can't I set sharing rules for Activities. I am trying to enforce a rule that only a certain role (or profile if thats what I have to do) can view an activity. For example I want any activity ...
0
votes
1answer
527 views

Criteria-Based Sharing Rules Limited To 50 [Per Object]

For those familiar with the subject, how would you go about circumventing the limit of 50 criteria-based Sharing rules? Is there an Apex-based solution for critera-based Sharing? Is there some OTHER ...
0
votes
1answer
44 views

Sharing Rules - Markers On User Record To Control Visibility

Apparently I've made a long time assumption about Sharing Rules that may not be true. Sharing Rules Based On User-Record Markers If I have a Checkbox on the User record called "Allowed To See XYZ", ...
13
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 ...
1
vote
1answer
138 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
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 ...
0
votes
1answer
582 views

Creating sharing rules through apex not manual sharing

Is it feasible to create sharing rules through apex , not manual sharing of records? Can someone please let me know if that can be done?
0
votes
1answer
66 views

why am i getting Insufficient Privileges on contacts from my customer community user?

I have created a customer community and granted sharing rules to the customer user but he cant seem to access the contact entity no matter what. If i change the wide organisation set to public he can ...
1
vote
1answer
303 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 ...
0
votes
1answer
262 views

Partly sharing detail records of a master-detail relationship

In our data model, we have several objects that are details of account (master-detail) relationship. I want a profile to have access to the records of Object A and B if they are the owner of the ...
2
votes
0answers
942 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 ...
0
votes
1answer
109 views

List has no rows for assignment to SObject Customer Portal - Communities

I need your help to understand what's happening here. We are using the Customer Portal (Community) for quite a long time, we use 'Customer Community Login User' profiles that we assign to external ...
0
votes
0answers
33 views

Grant access to record by a lookup field

We want to grant access to opportunities based on a lookup field. For example We have an opportunity in our org. I am the current owner. There is a lookup field to users called Team member. We need ...
0
votes
1answer
888 views

Writing a test class for my sharing rule apex trigger [closed]

I have hopefully created a trigger that works and I am looking to write a test class for this, I have very little experience using apex but am trying to learn, if someone could give me some advice on ...
0
votes
1answer
85 views

Apex Sharing trigger

I have been trying to create a trigger that acts in the following: Whenever scrum team is created, look up via account, gather the account id, query salesforce to get all contact id's related to ...
0
votes
2answers
57 views

How to give permissions to user?

I Have three users with respective roles role hierarchy is CEO --> Manager --> Subordinate. When i share records to subordinate records will see manager because he is superior to subordinate. How it ...
0
votes
1answer
303 views

Case sharing rule

I have one requirement where it should allows users access to the cases they request. The OWD is set to private and we created several case sharing rule's to grand access tousers to see all cases. ...
0
votes
1answer
100 views

Hide Accounts to Partner Users

Our OWD Setting is: Account, Contract and Asset - Public Read Only Opportunity - Private We have a sharing rule that enables Partner Users to view and edit internal opportunities. However, this ...
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" ...
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
1k 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
528 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
368 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 ...
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 ...
0
votes
2answers
20 views

Limit visibility of records

I have sObject for example Account, with records. And two users John and Jack. I want show to this users part of records, by using criteria. Something like, John show records with Account.Name = ...
0
votes
1answer
43 views

How to show user only part of records?

I have user profile named SimpleUser, and sObject Account How to show only part of records from Accounts for this user? Criteria for this value of record from another sObject related to Account and ...
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 ...