Questions tagged [sharing]

Sharing enables record-level access control for all custom objects, as well as many standard objects.

Filter by
Sorted by
Tagged with
-1
votes
0answers
11 views

In default sharing code blocks, which would use sharing settings, apex triggers or anonymous blocks? [duplicate]

If there is a code block that does not include the with/without sharing keyword, would Anonymous blocks and Apex Triggers use the sharing settings, field permissions, and OWD for the running user?
0
votes
1answer
569 views

Selectively Deleting sharing rules

Hi guys I am trying to delete sharing rules on a custom object (say myCustOb__cj) based on if the user is a portal/community user or an internal user. If the user is a portal user then delete the ...
0
votes
0answers
29 views

AllInternalUsers group not working on scratch org

I was trying to test sharing rules on a custom object: Record_For_Sharing__c The object's organisation-wide default sharing setting is private for both external and internal users. I added a sharing ...
2
votes
1answer
536 views

Edit Permissions for Guest Users after “Secure guest user record access”

Salesforce Alerted me that at the end of February we would be forced into the security update for "Secure guest user record access". I tried this in my sandbox and it seems to have some adverse ...
0
votes
1answer
19 views

Role Hierarchy/Sharing Settings Issue? PostToChatter FlowAction - You don't have permission to do this

Note - I'm posting this question as there's clarity required - At what level does the record access need to open up for this scenario to be successful? This hasnt been clearly answered on the ...
0
votes
1answer
18 views

How to share an opportunity to running user(low level of role) using apex

I am trying to share an opportunity using apex. Apex running user is having low level of role compared to opportunity owner. How is this possible ?
1
vote
1answer
375 views

Getting Insufficient Access on task record while trying to edit it

I have a Job Record and Two Users like User A and User B. User A creates a task on Job Record 123 and tasked it to User B. Now User A is created by of this newly created record and user B is owner of ...
0
votes
0answers
16 views

Does territory hierarchy rolls up access to records?

I have been working on territory hierarchy and I have some doubts regarding how the access actually opens up. Lets assume the OWD is set to private for Account object. I have a territory model let's ...
0
votes
1answer
373 views

person account security settings

For all the Business Account I need to have Read Only access and for the person account I should have read Only, Create and Edit permission. Where I can make the changes or settings?
0
votes
0answers
15 views

Account record owner can see all assotiated opportunities

As far as I know there is lookup rel between Account & Opportunity. But why Account record owner can see all assotiated opportunities even oportunity record has another owner? Quote from trailhead:...
0
votes
0answers
18 views

Manual Sharing related question

I have 2 Objects A and B-- relationship master detail. OWD on A- Private OWD on B- controlled by parent If I manually share A records with other user will they get access to B as well? provided i have ...
1
vote
1answer
34 views

INSUFFICIENT_ACCESS_OR_READONLY when editing an Order

When editing an Order (either through the UI or via an Apex program that does DML), I get First exception on row 0 with id 801.... INSUFFICIENT_ACCESS_OR_READONLY insufficient access rights on ...
2
votes
2answers
90 views

Does with sharing enforce OLS/FLS?

I am really confused about this one. I have done my share of research. In the documentation, it has been mentioned that with sharing keyword is used to enforce sharing rules for the current user. It ...
9
votes
2answers
100 views

Clean way to vary sharing at runtime in Apex?

I may need to make many @RestResource Apex classes run either with sharing or without sharing where that option is selected at runtime. But this approach (that I am using at present): /** * Allow ...
1
vote
1answer
35 views

How should I share a summary-level view of opportunities without sharing their activities, emails & files?

I have an org containing several business subsidies working on opportunities. These opportunities may have sensitive data attached to them in files, emails, calls, etc. Users in each subsidy should ...
3
votes
1answer
50 views

Inherited sharing question in nested inner classes

The sharing documentation Using the with sharing, without sharing, and inherited sharing Keywords says: The sharing setting of the class where the method is defined is applied, not of the class where ...
1
vote
1answer
26 views

Include sharing settings in an unlocked package?

Is it possible to include a sharing setting change in an unlocked package? Essentially the change is to make an object Public Read/Write for External users, whereas now it is Private.
5
votes
1answer
2k views

How to share External Account, Contacts, Custom Object Records for Partner User in Communities

Is it possible to share the external Accounts to a Partner Enabled Account User(Partner Account -> Contact (Partner User)) ? The Scenario is something like this: I have Account, Opportunity etc. from ...
4
votes
2answers
10k views

How to Share a ContentDocumentLink using “Set by Record”

I want to use the "Set by Record" sharing option of Chatter files introduced in Winter '16. As far as I understood I have to add an AfterInsert trigger on ContentDocumentLink and reset the ShareType. ...
1
vote
3answers
674 views

Updating Record access Level

On Account object - OWD as Private I have a requirement consist of Two roles as 1. Process Owner - Creator of accounts 2. Manager Team - Verification team having access to those accounts We have ...
1
vote
2answers
35 views

insufficient access rights on cross-reference id when contact created from customer community and before trigger tries to update owner

We are trying to update the contact owner of a new contact created via the customer community in the before trigger and receiving the following error. insufficient access rights on cross-reference ...
0
votes
0answers
111 views

Set default value of 'Default External Access' to Private for new Objects

In Sharing setting, is there any way we can set the default value of 'Default External Access' to Private for new Objects? Like, whenever an Object comes in, the 'Default External Access' should set ...
1
vote
2answers
509 views

No such column 'CreatedDate' on Custom_Object__Share

I was trying to query Custom_Object__Share SELECT Id, ParentId,UserOrGroupId, AccessLevel, RowCause from Custom_Object__Share where CreatedDate > 2016-08-25T00:25:43Z I am getting an error no ...
0
votes
1answer
373 views

Why can Portal user see custom object?

I have Org-Wide Defaults set to Private/Private with Grant Access Using Hierarchies unchecked on a custom object. I have a sharing rule that says users may read the object if it is marked Active = ...
1
vote
1answer
374 views

Sharing rules for public read/write

Why do I see objects with public read/write permission having a section for sharing rules in the sharing settings.Should only private and public read only not be open to creation of sharing rules.
0
votes
1answer
19 views

Share Record with profiles

While creating a new record for my custom object I capture (Checkboxes) if this record is to be shared with a particular profile/group or not . for example If a community user will have access or not ,...
5
votes
1answer
393 views

Recalculating Apex Managed Sharing

I am studying "Apex Managed Sharing" but I have a problem with "Recalculating Apex Managed Sharing". The Apex Developer Guide says: Every time a custom object's organization-wide sharing default ...
1
vote
1answer
1k views

'Invalid page' on Detail page in Napili community when record isn't shared

It is written in Lightning documentation that programmer must be enforce Sharing and CRUD/FLS rules manually. But when user go to detail-page in Napili Community user get Invalid Page when record isn'...
1
vote
1answer
17 views

Sharing Table for Activities

When I try to query the sharing table for task it tells me that taskShare is not supported. Is there any way to access the sharing table for tasks or events? Select id, RowCause, UserOrGroupId from ...
0
votes
1answer
641 views

How to share records for Territory group

I am trying to share record (Account) to Territory. I followed steps explained in Granting Access to Records. I have activated Enterprise Territory Management and created few territories. Still, I don'...
0
votes
2answers
34 views

prevent deletion of records even the user profile having Modify All permission

I want to prevent users from deleting the records even if they have modify all data permission. Please suggest.
1
vote
0answers
22 views

File “Customer Access” Permissions

In Winter'20 there was added feature to allow "Customer Access" for files. Some of the users need to have access to it. Maybe someone knows or played with that? For the target user, this is just ...
3
votes
1answer
546 views

sfdx Sharing Settings scratch orgs

We use in our org case sharing (Setup-->Security Controls-->Sharing Settings-->Case (Default Internal Access From Public Read/Write/Transfer to Private)) Wa want this sharing settings in place when ...
3
votes
1answer
142 views

Can't deploy externalSharingModel setting with SFDX

Background: I have a problem where if I try to deploy my entire set of metadata to a newly created scratch org, it fails because the sharing settings of certain objects are incorrect by default, ...
2
votes
2answers
45 views

Changing a global class from with to without sharing in a managed package

I have a global class in a managed package and want to change it from with to without sharing in a new release. Is this possible? Could I do this in a patch?
0
votes
1answer
100 views

Unable to Insert ContentVersion record as a Community User in Test Class

I'm unable to create ContentVersion records running a test class as a Partner Community user. I have created a Partner user using the same methods displaying in the test class, tested the process ...
0
votes
1answer
23 views

help with soql to fetch sharing details of partner account

I have partner community users which have access to our partner community. We have couple of sharing settings applied for partner account when the record is created in Salesforce. We can find this ...
0
votes
1answer
630 views

How do we restrict access to certain Account, contact and opportunity records to certain users

I have a few Accounts, Contacts, Opportunities and a custom object to be accessible only to a group of users. All other Accounts/Opps/Contacts/Custom Objects are to be accessible by all users. The ...
1
vote
2answers
79 views

Sharing button is not visible in lightning in case object

I have installed a component called Lightning sharing to make sharing button visible for all objects in lightning. But the sharing button in not visible on case object. But it is visible in contact ,...
1
vote
1answer
373 views

Enable Query All Files permission

I see from the release notes that you can allow a user to query all files, even ones they don't own. I've having trouble giving myself that permission. I have a system admin profile, with view all ...
2
votes
1answer
148 views

Programmatic Access to “Grant Access Using Hierarchies”?

Is there any way to retrieve the "Grant Access Using Hierarchies" setting programmatically (i.e. through Metadata, SOQL, or other means)? I am referring to the checkbox next to each object under ...
2
votes
1answer
60 views

Is there a way to determine by Apex if `Grant Access Using Hierarchies` is turned on or off?

We have a requirement to display list of records available at territory selected. Since Grant Access Using Hierarchies can be turned on or off this can affect the records we need to display. We don't ...
0
votes
1answer
9 views

Limit records based upon multiple criteria on object and user

I'm looking at limiting access to certain records such that should a record be assigned to a certain group of users (via some field on the object), only those users would be able see or edit those ...
2
votes
1answer
166 views

API User Access to Enhanced Notes (ContentNote) External Object

Summary: Org 1 wants to be able to access data that lives in Org 2. For most use cases, we have this figured out using the Salesforce Connect Cross-Org Adapter. However, there is a specific need for ...
1
vote
1answer
39 views

Default Customer Community Plus Roles expose all Account's

I would like all Account's to be private, however users can see any Account enabled with Customer Community if that Account Owner is in the same Role as them. Using "Account Access", by clicking on "...
0
votes
1answer
96 views

How to share a lightning email template folder?

I'm trying to find the screen where you can share lightning email template folders with other users but can't see it anywhere. It's mentioned in here so I know it exists: https://releasenotes.docs....
0
votes
0answers
26 views

Alternative to Delete Trigger for tracking deleted records in OpportunityShare Object

We want to track the deleted records in OpportunityShare Object for some reason. This object doesn't support to write a trigger. Is there way to track those deleted records?. Any suggestion would ...
0
votes
0answers
18 views

Cannot Forward Records to Another Salesforce Organization via S2S standard functionality

After successfully setting up Salesforce to Salesforce (S2S) using this guide : https://help.salesforce.com/articleView?id=business_network_setup.htm&type=5 I have set up the connection between ...
0
votes
0answers
11 views

Sharing List View Salesforcebug Workaround

Any workaround for this type of scenario? Cannot select the group I wanted to :( it is displayed behind the dialog... I cannot target the z-index aswell... any workaround for this? PS: No Coding... ...
2
votes
0answers
49 views

Why Salesforce thinks I'm deploying a certain sharing model, while the metadata tells another story?

I have the account and contact object metadata files with the following sharing types: Account <sharingModel>ReadWrite</sharingModel> Contact <sharingModel>ControlledByParent</...

1 2 3 4 5 12