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
62
votes
8answers
54k 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. ...
43
votes
2answers
81k 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 ...
10
votes
1answer
9k 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 ...
10
votes
3answers
10k 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 ...
7
votes
1answer
3k views

Automated Process User Profile 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://...
33
votes
2answers
17k 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 ...
16
votes
1answer
5k 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 ...
18
votes
3answers
18k 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
3k 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: [...
3
votes
2answers
3k 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 ...
15
votes
2answers
5k 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 ...
12
votes
2answers
7k 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 ...
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, ...
10
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: ...
9
votes
4answers
17k 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 ...
8
votes
3answers
12k views

Enabling SAML SSO: where is the “Use Single Sign-On” permission?

We've set up Single Sign on with SAML. Our IdP is OneLogin and using their link, we are able to connect. We now want to disable password login for some users in Salesforce. Salesforce's documentation ...
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 ...
5
votes
1answer
452 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 ...
3
votes
1answer
443 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 [...
3
votes
1answer
2k 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....
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. ...
1
vote
2answers
3k 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 ...
0
votes
2answers
3k 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.
0
votes
1answer
116 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 ...
27
votes
10answers
12k views

Can I compare Profiles?

We have many profiles in our org, and I suspect that some of them are redundant because the person who originally set them up didn't seem to understand the purpose of Profiles (confusion with Roles, ...
5
votes
2answers
3k 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 ...
11
votes
3answers
6k 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 ...
9
votes
1answer
17k 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 ...
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 ...
11
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 ...
2
votes
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 ...
8
votes
1answer
2k 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> ...
7
votes
1answer
553 views

How to get list list of flows accessible by a User based on Permission Sets?

In order to provide more granular and controlled access to flows, all our flows are enabled with access setting of "Override default behavior and restrict access to enabled profiles or permission sets"...
6
votes
1answer
1k 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.
5
votes
4answers
10k 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
4k 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 ...
4
votes
2answers
2k 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 ...
3
votes
1answer
171 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
2k 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
1answer
1k views

list of permissions included in a permission set?

I want to see which permissions are included in one of my permission sets. is there a way to get them all at once? Best I can see is that you have to go through 5- 6 different screens
2
votes
2answers
786 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 ...
6
votes
1answer
859 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 ...
6
votes
1answer
918 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 ...
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.
4
votes
1answer
254 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
537 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 ...
4
votes
1answer
4k 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 ...