11 votes
Accepted

Is it possible to migrate changes to OWD's / Sharing Rules via Changesets?

I know this is an old question, but either the answer has changed or the answer was wrong. OWD is deployed as part of the metadata of the object. https://developer.salesforce.com/docs/atlas.en-us....
horzel_evh's user avatar
10 votes
Accepted

Can OWD be imported/exported as metadata?

Yes. Each object has two fields, "sharingModel" and "externalSharingModel". You can import and export these values between orgs. You'll find this setting in the CustomObject metadata. I personally use ...
sfdcfox's user avatar
  • 491k
9 votes
Accepted

What does "Use" mean in Organization-Wide Defaults of Pricebook object?

Below is the snapshot of the access levels for Price book Please refer to this link for more information
Samir's user avatar
  • 2,669
8 votes

Can one implement a Mutex / Lock / Semaphore in Salesforce?

My tuppence worth, very much late to the party. We had a need to do this as well. Our customers needed to expose wide sets of data to their users and let them select the sub-set they wanted to ...
Phil W's user avatar
  • 36.2k
7 votes
Accepted

When is the Sharing Button visible for a Record?

There is a small article on Salesforce help You have access to the Sharing button when your sharing model is either Private or Public Read Only for a type of record or related record. For example, ...
Oles Malkov's user avatar
  • 2,161
5 votes

Not able to alter Organization-Wide Defaults (OWD) via Apex

Update See Known Issue: sharingModel does not update through Metadata API CRUD-based calls (W-4865521 ) Summary sharingModel does not update through Metadata API CRUD-based calls API call ...
Daniel Ballinger's user avatar
4 votes
Accepted

OWD and Sharing Rule scenario with Role Hirerachy

For first point yes your assumption is correct. For second point is if in future you want to restrict this for some user and allow for some users then you need to again change the OWD to private but ...
Tushar Sharma's user avatar
4 votes

What is security access for child record when master is private

The first master-detail relationship you create on your junction object becomes the primary relationship. This affects the following for the junction object records: Look and feel: The junction ...
Mahmood's user avatar
  • 5,984
4 votes

Can we display the records in Visualforce page. If the object is private at OWD?

As long as the user's profile contains the Read <Object> permission (where Object is the object you'd like to display), you can display those records in a Visualforce page. By default, with ...
sfdcfox's user avatar
  • 491k
4 votes
Accepted

Able To Delete Sobject Even if No permission for User

It's allowing you to delete it because it's a without sharing class, in which Apex does not enforce sharing permissions. This is correct behaviour. Also recall that object- and field-level permissions ...
Charles T's user avatar
  • 11k
4 votes

Standard Object Permissions for Read-only profile

As the name suggests its a Read-Only, so no other permission will be there by default. Provided that the user has a record level permission, it will be able to read/Query the records. Q. What if the ...
Rahul Gawale's user avatar
  • 12.2k
3 votes

How to share access of a private child to same access as parent, without using master-detail?

The only other method for sharing custom objects that may suit your needs is Apex-Based Sharing. However, it's not perfect, because you can't create triggers on sharing tables to replicate the rules ...
sfdcfox's user avatar
  • 491k
3 votes
Accepted

SFDC Organization-wide default + sharing rules

You need to look at the ObjectPermissions object. It's a bit convoluted, so it ends up significantly easier to ask "Which Users/Profiles have Read permission?" than it is to ask "What are all the ...
Adrian Larson's user avatar
  • 150k
3 votes
Accepted

Query related to Manual Sharing and Sharing Button when OWD & Role Hierarchy is used

Please find this useful link for more information. https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_bulk_sharing_understanding.htm Please find comments to your queries ...
Shailesh Patil's user avatar
3 votes
Accepted

Restrict record visibility based on a field (even for the record owner)

Summarizing the key points from the comments as an answer (so those looking for an answer don't have to go thru all the comments). Record ownership is at the core of SF record access capabilities and ...
arut's user avatar
  • 5,281
3 votes
Accepted

Record Access Calculation when OWD is public read/write and Grant Access Using Hierarchies selected

When the system is set to Public Read/Write, it typically does not evaluate Sharing Rules when a user changes roles (because it won't perform any unnecessary operations), but there's still some Group ...
sfdcfox's user avatar
  • 491k
3 votes
Accepted

Organisation Wide Default and Sharing Rule and Apex Sharing

OWD is always the basic configuration for record sharing. So if you have sharing rules configured as more restrictive, OWD rules will be applied. If you open a page to create a new sharing rule, you ...
Oleksandr Berehovskyi's user avatar
3 votes
Accepted

If Object A is Master and Object B is Detail. OWD for Object A is private. Can you show records of Object B to User X when X is not the system admin?

Maybe lookup? The first thing to consider is, that there should be a master-detail relationship? or maybe a lookup will be more relevant? Because you would like to split the sharing of Object A and B, ...
Piotr Gajek's user avatar
  • 2,625
2 votes

Private or public read-only Organization Wide Settings for custom object?

You can actually now get this through the Tooling API! It is on the Entity Definition table. So you can run a query like this: List<EntityDefinition> sharingModel = [Select ...
Toby Curtis's user avatar
2 votes

Unable to overcome INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY

Having run into this issue myself today, here is one possible explanation: Apex testmethods do not honor criteria-based sharing. Hence... The lookup object custom which is created by the running user ...
cropredy's user avatar
  • 71.4k
2 votes

Does assigning visualforce page to object buttons override the OWD

Objects and field access: A visual force page will enforce FLS and CRUD if the fields are binded as sObject fields using input/outputField. Example: If a user does not have write permission for a ...
manjit5190's user avatar
  • 8,023
2 votes

How to determine if User is external

You can use the UserType field on User, see here: The category of user license. Each UserType is associated with one or more UserLicense records. Each UserLicense is associated with one or more ...
Aidan's user avatar
  • 13.7k
2 votes
Accepted

How to give Edit access to a user to the records that are not owned by him

You need to write Sharing rule and give the user Read/Write access to the record. You should not give 'Modify All' permission to the user. In the user's Profile, Give Read and Edit permission for ...
Santanu Boral's user avatar
2 votes

does sharing applied to child object

On the relationship field itself you can specify if read or edit access on parent is required to edit child. Sharing will apply, but subject to the definition in the relationship field. So if ...
gorav's user avatar
  • 4,527
2 votes
Accepted

How can I write a trigger when OWD settings change?

Trigger works when any DML operation is getting performed on an object (record). When OWD settings is changed Salesforce performs internal sharing and group membership calculations. We cannot write a ...
Santanu Boral's user avatar
2 votes
Accepted

Security setting issue in salesforce-OWD

First of all, you should assign the OWD as Private to that object. To expose the record visibility to the queue members, create public group based on which queue has been created. Write criteria ...
Santanu Boral's user avatar
2 votes

what happens to the records if record owner is inactivated or deleted from the org

Anyone above that user in the Role Hierarchy will still have access, even if the owner is inactive. Ultimately you will want to reassign these records to a new user. You can do this 1-by-1 by simply ...
RobGTX's user avatar
  • 73
2 votes
Accepted

Implicit sharing on custom objects relationship

1) CRUD access is not provided to any two of them such that a user has access to only one object at a time. Then what would be the sharing and visibility of related object's records. Since, OWD is ...
Santanu Boral's user avatar
2 votes
Accepted

CRUD & FLS - Trailhead

The Visualforce page has built-in measures to respect the CRUD/FLS settings of the logged-in user. As the trailhead unit describes: This table displays the object fields using standard object ...
Brian Miller's user avatar
  • 5,212
2 votes
Accepted

Delete records of other users with OWD as Public Read/Write

You should be above the record owner's role in the role hierarchy. As per the Article you will be able to delete the record only under the three conditions apart from having the OWD and delete ...
SaiPraveen Kakkirala's user avatar

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