32
votes
Salesforce bug enabled "Modify All"
You can easily check all of your profiles by clicking on "Your Name" > Developer Console > Query Editor, and using the following query:
SELECT Profile.Name, PermissionSet.Label FROM PermissionSet ...
16
votes
Salesforce bug enabled "Modify All"
From Salesforce Trust @ 5/17 12:56 pm:
The Salesforce Technology team is investigating an issue impacting Salesforce customers who use Pardot, or have used Pardot in the past. The deployment of a ...
13
votes
How can I assign a permission set to a user in a test context?
In addition to @patlatus answer....
Should you need to setup a custom permission without needing to care about what permission set it belongs to ....
// Given user
User userWithCustomPermission = new ...
12
votes
Accepted
"Your account has been disabled" error message
I spend some time digging deep into why I could not assign a Permission Set to multiple users within my DE org (Developer Edition) to come to the realization that these users were inactive within the ...
10
votes
Packaging system permissions in permission sets
As outlined in the documentation, you may only package the following permission set items:
Custom object permissions
External object permissions
Custom field permissions
Custom permissions
...
10
votes
Accepted
How to check which permission sets includes a edit permission on a field?
You can query for this in FieldPermissions:
select parent.name from fieldpermissions where field = 'account.accountnumber' and permissionsedit = true and parent.isownedbyprofile = false
10
votes
Accepted
How to get list list of flows accessible by a User based on Permission Sets?
In short: I managed to do this in Apex by using apex-mdapi AFTER I updated the code to support flowAccesses. - here's the github commit with changes needed to support it. This is the only way I can ...
10
votes
Accepted
Spring 22 testmethod GACK when assigning a PermissionSet to a newly-created user
Fixed - This will be handled by Spring '22 Patch 4.6.
Update: There is now a Known Issue - Test classes are failing with Salesforce Internal Server Error. The workaround listed is to update the ...
9
votes
How to resolve an "Unknown user permission: SendExternalEmailAvailable" deployment error
Set Email Deliverability to 'All Email':
For unknown reason Salesforce automatically creates and removes this permission completely behind the scenes on all profiles based on the value of this ...
9
votes
Accepted
Deployment fails with: INVALID_CROSS_REFERENCE_KEY, You can only assign users to permission set groups that have the "Updated" status
Some observations
If I login to the sandbox directly, and run all tests - they pass - no error
Go to Setup and check the status of the Permission Set Group MyPSG - it is Updated
I injected an assert ...
8
votes
How to resolve an "Unknown user permission: SendExternalEmailAvailable" deployment error
This relates to the "Send through External Email Services" setting in Setup. Go to Setup > Email Administration > Send through External Email Services to see the setting. According to the description ...
8
votes
Accepted
Permissions & Settings in Profile and Permission Set and its Usage
The Rule of thumb is permission set extend the access of profile and do not restrict.
1.In first scenario since profile already has access which means permission set cannot disable as permission sets ...
8
votes
Salesforce bug enabled "Modify All"
As of 3 PM CDT.
This is something I got to hear around from my colleagues who were part of the webinar that Salesforce had around this issue.
The issue seemed to have affected DR sites as well, so ...
8
votes
Accepted
Can't assign permission set to my user after installing Salesforce Data Mask!
It was not really clear from the announcement or from most of the documentation, but Salesforce Data Mask is actually a paid feature, and if you want to use it you need to talk to your Account Execute ...
8
votes
Accepted
Permission Set->Flow Access available flows is empty
"Run Flow" permission lets you run all flows by default
On the list of Flows, click "Edit Access" on the right-hand end picklist. This will let you Override the default for one ...
8
votes
Can we prove security using Apex Tests & System.runAs()?
I must admit, we have not attempted to revisit this side of things - our core managed package is too large and too mature.
What I do know, from the few uses of System.runAs we have, is that this is ...
7
votes
Get List of Permission set assigned to the user
Is there a requirement that you need all the Permission sets to be queried for some other use? Or else if its just to check why don't we directly use this query
SELECT count(Id) FROM ...
7
votes
Assigning permission set to user in apex
List<PermissionSetAssignment> permissionSetList = new List<PermissionSetAssignment>();
for (User u : [SELECT ID,UserRole.Name,Profile.Name,IsActive FROM User WHERE UserRole.Name LIKE '%...
7
votes
Accepted
How to know if a field is part of a compound address field and thus is not permissionable
There is an easy way to determine if field is a real field or a part of compound field.
There are two tables in Salesforce which correspond to compound fields and its components.
If a field can be ...
7
votes
Accepted
How is Permission Set Metadata Deployment changing in Summer '17 (API 40.0)?
By fully retrieving all permissions all the time, it will avoid the various Bad Things that happen when you only retrieve a partial package. This would lead to the XML file spuriously growing very ...
7
votes
Accepted
Get all field level permission from SOQL for an permission set
As mentioned by @benahm, SOQL on FieldPermissions retrieves only enabled field permissions for the permission set.
Furthermore, as per chapter "Special Properties for Field Permissions" in ...
7
votes
Change/Update User License assigned to a permission set
No, you can't change the license, but you can clone the permission set using vs code.
Get your existing permission using package.xml
<types>
<members>*</members>
<name>...
7
votes
Accepted
How to change field permissions in a permission set or profile programmatically (APEX)
You can Provide Field Permission to permission set by creating FieldPermissions record like this
FieldPermissions fp= new FieldPermissions();
fp.Field='Case.AccountId';//the name of new field
fp....
6
votes
Permission Set - Deciding correct components
You need to give access to visualforce page only. As per the docs:
Once users can access a page, they can execute all Apex that’s associated with the page. This includes:
The controller for the page ...
6
votes
A good explanation for roles/profiles/permission sets and sharing
You can check this link
http://hellosnl.blogspot.com/2017/08/salesforce-security-concepts.html
Also check this image
6
votes
Hide Field within Permission Set
Permission sets are not used to prevent access to fields, to do that go to the profiles for the relevant users and untick access on there.
Then use the Permission Sets to give access to the other ...
6
votes
Edit access to few fields in permission set
If you don't have Edit access at Object level then, only providing Edit access at FLS will not enable record for Edit.
So, provide Edit access at Object at profile/permission set and then only ...
6
votes
Accepted
Possible reasons why a quick action button is not shown for a non-admin user?
Why would a user not see Global or Quick Actions?
Despite the User being assigned a Page layout with Global or Quick
Actions selected to display, they cannot see them in the Feed. This
can ...
6
votes
Accepted
Accessing Custom Permission from Managed Package
Salesforce support told us that this is an error in the documentation, which they will correct.
The "checkPermission" method inside a managed package will only be able to verify the custom permissions ...
6
votes
Get all field level permission from SOQL for an permission set
As stated in the SOAP API Documentation
FieldPermissions : Represents the enabled field permissions for
the parent PermissionSet. This object is available in API version 24.0
and later.
So ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
permission-sets × 560permissions × 130
profile × 126
apex × 85
managed-package × 51
soql × 32
custom-permission × 23
deployment × 21
security × 20
user × 19
field-level-security × 19
sharing × 18
salesforcedx × 16
community × 15
permission-set-groups × 15
metadata-api × 14
administration × 14
licenses × 14
metadata × 12
user-management × 12
unit-test × 11
connected-apps × 11
visualforce × 10
visual-workflow × 9
isv × 9