Questions tagged [permissions]

Salesforce permissions are all about what a user can do in terms of Field Level Security, object level access, Apex class access, Visualforce page access, and other built in Salesforce access that are handled via a profile or permission set.

Filter by
Sorted by
Tagged with
59
votes
8answers
43k views

What is the best way to deploy profiles in Salesforce? (especially system admin)

What is the best way to deploy profiles in Salesforce? I have a system admin profile with access given to the objects that i have created in my sandbox. I have about 1000 fields across these objects. ...
38
votes
2answers
54k views

How to fix insufficient access rights on cross-reference id?

I am getting the error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: [] Scenario is, I am inserting an Opportunity and then Opportunity Line ...
6
votes
1answer
5k views

Query Which Profiles Have Read Access To Specific Object?

Since I couldn't think of how to write this query off the top of my head, I thought it might be worth sharing. How can I query which Profiles have Read permission on a specific object? I knew it would ...
9
votes
3answers
3k views

What are permissions are needed to upload a file via a public Salesforce community page?

I would like to be able to upload files using <lightning:fileUpload which is on a public community page. The community is using template: Customer Account Portal. The files would get attached to ...
31
votes
2answers
16k views

How to access profile permissions via API

If I know the name of a certain profile, I would like to obtain CRUD permission settings for each object in the profile using Apex. I see that there is an sObject called Profile, but this only ...
15
votes
1answer
3k views

When to add apex class permissions to a profile

The apex class permissions are a bit confusing to me. For example, classes used by page controllers do not need to be added to the profile. Can anyone give a complete list of scenarios on when you ...
10
votes
1answer
2k views

Unit-Testing Sites Permission Involving a Sharing Rule with Unit-Test Created Data

We currently have a Salesforce Site, and we're trying to add some unit-tests, around permissions and sharing rules that need to be set. We've smoke tested everything via the UI, and permissions appear ...
17
votes
3answers
9k views

Does Process Builder run with System permissions or User permissions?

Regarding field-level security, does Lightning Process Builder run as system-level permissions or user? That is: Can I trigger an update to a field that the current user cannot edit? Can I filter ...
6
votes
3answers
678 views

For the Platform Event “Automated Process” user, why do both Visualforce controller access and email sending fail?

We are executing some asynchronous code that uses getContentAsPdf on a Visualforce page as the result of handling custom platform event and we get this error in the Apex Jobs listing: First error: [...
4
votes
0answers
800 views

Automated Process User Permissions

We are having some difficulty with permissions. Our admin has also posted on the success board. https://success.salesforce.com/answers?id=9063A000000eB7V, she also found this same posting: https://...
3
votes
2answers
2k views

Show “Insufficient Privileges” directly when clicking 'Edit' (override), not on 'Save'

If a user clicks 'Edit' on an opportunity which he isn't allowed to edit, the "Insufficient Privileges" page directly appears. This is good. If a user clicks 'Edit' on a custom object (which has an ...
10
votes
2answers
3k views

Custom Controllers - effect of running in System mode

The VisualForce Developer's Guide says: Like other Apex classes, all custom controllers run in system mode. Consequently, the current user's credentials are not used to execute controller logic, ...
9
votes
3answers
2k views

Can't install managed package because packaged permission set seems to have lost a read permission

I developed a Managed Extension Package. When I try to install it or create a patch org for it, this fails with no error but the note to call Salesforce. Support told me that it fails due to: ...
8
votes
4answers
15k views

What overrides a profile?

I am confused about the hierarchy of settings 1) I have a profile A and it has a read only access. I have a permission set specific to an user and the permission set grants the user access to edit ...
11
votes
6answers
1k views

App disappears from Permission Set included with package

We're working on our first Salesforce package, and recently switched from creating Beta packages to a Managed Package. For some reason, the permission set that we're pushing loses the entry in ...
6
votes
3answers
1k views

Pulling Permission Sets only through IDE polls a trimmed version of them

In Eclipse Force.com IDE I created a Force.com project that was configured to pull the Permission Set folder only. The Permission Sets have been pulled, but in what appeared to be a trimmed form - all ...
3
votes
1answer
1k views

Getting User - List View mapping using apex

Is there any table or any other way(metadata/rest api) we can query the list views of a particular object that a user/group has access. Example: SELECT Name FROM table_x WHERE UserOrGroupId = '1234....
3
votes
1answer
403 views

$Permission.CustomPermissionName doesn't work in VF page

Winter '15 brought new Global Variable $Permission. When I'm trying to use it on VF page as suggested in documentation $Permission.[customPermissionName], I get error: Error: Field [...
1
vote
2answers
2k views

Hide a Field From ONE User

Scenario: If I had a Custom Profile / Standard Profile, say Sales,and I have 50 Users assigned to the same Profile and had same Permission / Access on a particular object (Could be Standard or Custom ...
1
vote
2answers
1k views

VF controller system context versus Sites Guest User object permissions

I'm trying to clarify VF controller context versus Sites Guest User permissions on Contact record. From everything I've read, a VF controller using "without sharing" operates in the system context. ...
0
votes
1answer
110 views

Permission Deploy Change Sets Error When Saving a Profile

I have profile "Test". When I click Edit and then Save I get the following error message: This is just a part of a huge error message, which lists all problem objects. The last part of this message ...
0
votes
2answers
2k views

Check user permissions through REST-API

Is there a way to check whether current user has certain permission via REST API? Preferably without using metadata APIs.
15
votes
2answers
4k views

are Triggers (and their delegated classes) or Batch affected by sharing?

I understand with sharing classes run in User Mode, meaning they respect permissions, field-level security and sharing rules of the current user. I understand without sharing classes run in System ...
3
votes
1answer
2k views

Getting all Users and their Custom Permissions

tl;dr Want to make a SOQL to return all Users and there (custom) permissions Hi there I've just started using SF, so bare with me if this is very basic. One of the usages of salesforce we're ...
10
votes
3answers
5k views

Metadata API Custom Field Permissions (how to automate this process)

We are using the Metadata API to add Custom Fields to the Account object in Salesforce. We are able to create the custom fields, but then the Salesforce user has to manually login to their account ...
11
votes
2answers
2k views

How do you Apex Unit Test Object(CRUD)/Field(FLS) Permissions in an Org Portable manner?

Specifically, how might one get an org portable Apex Unit Test User that DOES NOT have READ access to Accounts? Creating a Test Permission Set that DOES NOT have READ access to ACCOUNTS and assigning ...
8
votes
1answer
16k views

INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: [] on opportunity

I have created an object named as "Component" which has Master-Detail Relationship with Opportunity Object. On Opportunity we have a button says "Create Component", when user clicks on it it takes ...
10
votes
1answer
2k views

How To Cause DmlException - Delete

I thought I would be able to take a User who does not have delete privileges on an object, delete records from that object, and get a DmlException. No dice. Below are the Case permissions for the ...
3
votes
1answer
2k views

Custom Report Type Broken

I deployed a change set that included two custom report types for accounts with opportunities. These two custom report types sat next to an existing custom report type. Ever since this deployment ...
10
votes
2answers
5k views

Owner custom fields and some standard fields are not accessible in relations

I am trying to access owner information using soql for managed packaged sobject. select id,ownerId,owner.name, owner.Email_Subscription__c from ARE__HavesWants__c I tried above query but it is ...
8
votes
1answer
1k views

Updating profile via Metadata API from Apex gives weird error

I am trying to automatically enable pages for profiles (profileApexPageAccess doc) via Metadata API. Here is my method: public static void updateProfileAccesses(String profileName, List<String> ...
6
votes
1answer
972 views

Permissions to execute System.abortJob() method

What permissions does user need to call System.abortJob() in Apex? When the method is called this error is displayed: System.SecurityException: Insufficient Privileges. Thanks.
4
votes
1answer
3k views

system.security.NoAccessException: Update access denied for RecordType

I have a Visualforce Page that uses a standard controller (Opportunity) and an extension. In the extension I have a method that saves updates to the opportunity and a related contact. The extension is ...
3
votes
1answer
142 views

FLS behaviour different between API and GUI/Apex

Assume Contact.DoNotCall and Opportunity.ContractId are FLS invisible for the standard profile "System Administrator". Both fields are visible in the setup and are reported by describe calls in Apex ...
3
votes
1answer
1k views

CRUD permission check Security Review with SOQL queries needed?

The CRUD permission check for Security Review has been imposed recently, though I'm clear on the DML statement and Create/Update/Delete permissions I need to check for in my code, but I'm not clear ...
3
votes
2answers
1k views

How to query users who have access to a particular record?

I have been going through the forums and the documentation and I do not find a way to query the Users who have access to a particular record. For example, when I upload a document, a mail has to be ...
2
votes
2answers
756 views

Why doesn't File Location Lookup show attachments of Opportunity?

My opportunity has some attachments. I would like to send them via email. If I hit on "Attach File" button of "Send an Email" page, then File Location lookup filter window, dialog appears, however I ...
1
vote
1answer
2k views

Query Object Access by Profile

I have looked at the documentation and it seems the best I can do is query ObjectPermissions for PermissionSet access. Is it possible to do the same for Profile instead of PermissionSet? THANKS FOR ...
6
votes
2answers
2k views

Can you show/hide a custom tab on a per user basis?

Is there a way to show/hide a tab on a per user basis? I would like to manage this with Apex, but examples of managing this from the UI would also be helpful.
6
votes
1answer
794 views

Cannot create a Permission Set related to an Idea via Console or Anonymous

I am trying to create a permission set in my code but I'm getting some issues when I tried to assign an Idea, Product2 or Pricebook. With some other objects like custom or other Standards, I'm able to ...
5
votes
1answer
294 views

Query Author Apex Permission?

I'm trying to figure out how to query all users who have Author Apex permission (or any other system permissions). I thought it would be straightforward, but I don't see where it would be stored. With ...
5
votes
1answer
632 views

where do we have userPermission “ AllowUniversalSearch”

While exporting the metadata of SystemAdminstrator Profile I am getting a user permission " AllowUniversalSearch" but not able to figure out from where can we set this permission as it is not visible ...
5
votes
4answers
9k views

How do 'Modify All Data' and 'View All Data' affect Field-Level Security settings

Does the Modify All Data or View All Data permission allow a user/profile to ignore the FLS settings for an object? The documentation would seem to suggest that this is the case, but I've found ...
4
votes
1answer
196 views

Can I completely replace Profiles with Permission sets

I have a managed release package which is having one custom profile. Now in next release I want to create a new profile in V2.0 of released package. But what I found is while upgrading package, I can ...
4
votes
1answer
500 views

Minimal required permission to git rid of 'security evaluation for non-admin users' error

I'm using Salesforce REST API for migration of customers' data and from time to time I encounter this error: 'Implementation restriction: activity aggregate relationships only allow security ...
3
votes
2answers
162 views

How do Internal User manages Custom Setting data without 'Customize Application' Permission?

We have created Vf page to manage custom setting data , its working well for system admin but when we logged in as internal user it throws this error :system.security.NoAccessException: Create access ...
3
votes
1answer
148 views

Permission model on Managed Package

I'm working on creating a managed package and am struggling to understand the permission model. The managed package will be accessed by a Sales Manager kind of profile and needs access to few custom ...
3
votes
1answer
3k views

Error: The Connect API is not enabled for this user type

I am working on creating a Force.com site and I have a VF page which displays fields from a custom object record and also displays its Chatter feed. I achieved displaying the Chatter feed using the ...
2
votes
3answers
3k views

Can I reference permissions in Validation Rule formula?

I'm trying to cut down on the number of profiles in one of my Orgs. One way we're using profiles is to enforce business rules, like "Only a ZZZ user may close opportunities as won," which we do by ...
2
votes
2answers
2k views

Customer community plus users can see contacts in list views, but not the actual records

My customer community plus users can view contact fields as expected in related lists and list views, but when they click on a contact to view the full record, they see a permission denied message. ...