Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [custom-permission]

Custom permissions let you define access checks that can be assigned to users via permission sets or profiles, similar to how you assign user permissions and other access settings.

Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

Salesforce Report opening in a New tab from Dashboards only for few users

In our org, for few users salesforce report is opening up in a new tab when they click on "View Report" from salesforce dashboard widget. This is only happening for a specific dashboard. ...
user avatar
  • 13
0 votes
0 answers
30 views

Show/Hide field on Detail Page for different users without changing Profile Salesforce

I have a use case where we have 2 users with same profile (User 1 and User 2). User 1 should see the field Field1__c and for User 2 the field1__c should be hidden. At the Profile level - the Field1__c ...
user avatar
  • 494
0 votes
1 answer
32 views

Delete Permission on ON CRUD access at object level for users

I have a requirement i have custom object(Broker__c) and i have Profile(Sales) we have around 100 users in the profile . We need to remove delete permission for 10 users. The object has all the CRUD ...
user avatar
  • 55
0 votes
2 answers
43 views

Trigger based on profile name & custom permission set

In my trigger I would need to make a condition according to the user profile as well as a custom permission set , and here is my code which does not deploy due to "Unexpected token" error . ...
user avatar
0 votes
1 answer
30 views

User with custom permission on their permission set is enable to perform the update

I am writing a test class where the user with a specific custom permission on their permission set should be able to update the object records. This functionality totally works when doing the update ...
user avatar
0 votes
1 answer
102 views

Custom Permission Check in LWC always returning undefined

I am trying to disable a button on an LWC based on a custom permission, but I cannot seem to make it work. Here is the code involved: js controller (let's call it actions): import ...
user avatar
0 votes
1 answer
66 views

Restriction Rule Comparing Record String Formula Field to string value

I have a formula field set up to read the String/Text value of a Formula field on a record for the comparison in a Restriction Rule. When I enable the rule and access a record that should be ...
user avatar
0 votes
1 answer
91 views

Custom permission assignment programmatically in salesforce [closed]

How can we assign custom permission to user via apex coding
user avatar
1 vote
1 answer
216 views

Validation rule ownership change

I'm trying to set up a validation rule where only the current record owner or an administrator can change the account ownership. This is what I have at the moment: AND( ISCHANGED(OwnerId), $...
user avatar
  • 113
1 vote
1 answer
363 views

Custom Permission added to Running User in testmethod has no effect

Let's say there's a Custom Permission OrderBulkCancel that grants the running user the ability to cancel more than one order in a transaction. The Custom Permission is evaluated at runtime with: if (...
user avatar
  • 61.5k
0 votes
0 answers
75 views

Custom permission evaluating to null

I would like your help to understand what I'm missing. I am evaluating a custom permission in a formula to check wether the user has the permission set assigned, here is the formula: AND( NOT($...
user avatar
0 votes
1 answer
45 views

Create multiple custom permissions

I have a requirement to create multiple(around 100) custom permissions. Can this be done using data loader or workbench? In data loader when we select insert option I don't see custom permissions ...
user avatar
0 votes
2 answers
401 views

Grant permission to Lead object

I need a specific profile to be able to view Leads. But the Lead object is not visible under that profile. Which permission do I need to enabled. Lead object is available under System Admin profile.
user avatar
0 votes
1 answer
546 views

Give User Customize Applications permission

I am trying to give one of my users the ability to assign values in field dependencies. I believe that the permission they need to do this is "Customize Applications" however i can't seem to ...
user avatar
0 votes
1 answer
55 views

How to give two users with different profiles and roles the ability to edit some fields but all other users from editing the field(read only)?

How to give only two users with different profiles and roles the ability to modify some fields but others should have (read only)? I would like to avoid creating a brand new permission set or page ...
user avatar
  • 5
6 votes
1 answer
667 views

LWC custom permission error in subscriber org: Invalid module id "MY_NAMESPACE__My_Custom_Permission" for type "customPermission"

I'm trying to access a custom permission in a Lightning Web Component. This is the js code in my managed package development org: import { LightningElement } from 'lwc'; import hasCustomPermission ...
user avatar
  • 5,459
1 vote
2 answers
174 views

SessionPermSetActivation doesn't work according to specification

There is an issue with implemention of the following feature : https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_sessionpermsetactivations.htm In attempt to utilize the ...
user avatar
1 vote
1 answer
456 views

Why did my lightning components stop showing up on my record pages in my scratch org after including my namespace?

I am using custom permissions to control when my lightning component appears on a given flexipage record page. The intent here is to make it easy for an admin to use a UI that I made to toggle ...
user avatar
0 votes
1 answer
699 views

Opportunity Validation Rule on Stages and CloseDate

My validation rule when Stage Name is = Closed-Won I want no user will be able to update to change the Close Date expect users who have this custom permission $Permission....
user avatar
  • 21
3 votes
1 answer
200 views

Fine-grained app licensing using FMA and Permission Set Groups

Salesforce.com own apps are licenced using a fine-grained hierarchy of user licenses and add-on licences where each license has costs and restricts what I can do in an app. As an ISV selling Managed ...
user avatar
4 votes
1 answer
408 views

How to use native FMA Feature Management at scale?

I'm thinking of leveraging the Salesforce FMA and Feature Management toggles to allow AppExchange app: Finer-grained user permissions Silent/Hidden feature releases A/B testing When looking at the ...
user avatar
0 votes
1 answer
594 views

Move permission set assignment in different tier using ANT

I have created custom permission and added it to newly created permission set and assigned users to that permission set. I was able to move Permission set and Custom Permission file from DEV to ...
user avatar
  • 3
0 votes
1 answer
38 views

How make restriction for app from appexchange?

Context of problem: I installed app from appexchange and there was I had to allow for access to my data in my org. Question Do you know how I can make restriction access to data using in the app? ...
user avatar
  • 3
4 votes
1 answer
948 views

How to programmatically determine in APEX if a custom permission is assigned to a given permission set?

Background: I am trying to make a UI that will simplify managing assignments of some custom permissions against permission sets in my managed package. This section of the managed package would only be ...
user avatar
3 votes
1 answer
119 views

What is the permission that governs reading Custom Permissions? [closed]

Our managed package has some custom permissions that help provide an elevated set of capabilities to some users. We have recently run into an issue with some people seeing this error message: "Read"...
user avatar
3 votes
1 answer
491 views

Accessing Custom Permission from Managed Package

I'm trying to check the User assigned Custom Permission from a Managed Package. The Custom Permission and the Permission Set are not part of the package, but in the subscribers Org. Currently I'm ...
user avatar
  • 103
1 vote
3 answers
705 views

Control access exclusively to custom metadata screen

I am wondering what is the way to get edit access to a specific custom metadata using PermissionSet in UI. Here is what i have done: Setup -> PermissionSet-> MyPSName system permission -> checked ...
user avatar
3 votes
0 answers
166 views

Custom Permission in Validation Rule evaluating as Null when assigned

We have a requirement to prevent changes to a contract record once active unless the you are a contract admin, which can span multiple profiles. I'm trying to accomplish this by using a custom ...
user avatar
  • 51
0 votes
0 answers
120 views

Could we are able to update System permission set of Profile via apex code

I am trying to update System Permission set of Profile by apex code which is already assigned to an active profile. Is it possible to update? if yes, Then can someone please suggest how do I do that? ...
user avatar
0 votes
2 answers
36 views

need to provide one permission to users

I just wanted to add one permission to users (Sales(standard__LightningService) the current approach is to create a permission set and assigned connected app to PS.is this good for only one ...
user avatar
  • 5
0 votes
1 answer
348 views

Profile access on Custom Fields in Einstein Analytics

In Einstein Analytics, to see what field permission a User has on a Custom Field via Permission Sets can be achieved using combining FieldPermissions object and PermissionSetAssignment Object. But, I ...
user avatar
0 votes
0 answers
657 views

Using Custom Permissions to restrict picklist values to specific users

My goal: Using Validation Rules and Custom Permissions to restrict accessibility of specific values seen in the Account Type picklist to be available only to specific users. I have the custom ...
user avatar
-1 votes
1 answer
2k views

Getting User custom permission in Visual Flow

I need to check if the running user has a specific custom permission in their profile within my flow logic. How can I check that?
user avatar
  • 4,859
2 votes
2 answers
747 views

Can I use $Permission in a Workflow Rule?

I've checked the documentation (and the stack exchange) and have only been able to find references to it being used on: Validation Rules Visualforce Process Builder Can I also use it on a Workflow ...
user avatar
0 votes
1 answer
274 views

Custom Permission is not recognized by Visualforce in the Tesing Org [duplicate]

I have a custom permission in my Managed Package. I use it in my Visualforce page to allow certain features for users that have this permission. <apex:commandButton value="Register Connection" ...
user avatar
  • 4,645
3 votes
1 answer
376 views

Javascript Static Resource access Custom Permission

we recently decided to refactor coding which uses hardcoded Ids and Names for permission checks on profiles. We want to use custom permissions, which then can be added to permission sets and ...
user avatar
17 votes
3 answers
17k views

How can I Efficiently Check if the Running User has a Custom Permission?

Is there any way to check in Apex if the running user has a specific Custom Permission? The best I know of using available methods involves two separate SOQL queries: public static Boolean ...
user avatar
  • 142k
2 votes
0 answers
341 views

Async SOQL Query - Insufficient_Access

I'm trying to learn Async Soql, and messing around with simple test scenarios. I've reached a block where I'm just trying to move the name of Account and create a new Custom Object with that name. I'...
user avatar
  • 21
1 vote
0 answers
453 views

Any workaround for enabling create opportunity splits for users of lower role hierarchy than the record owner?

Just saw in the ideas that a functionality is not available till now, that a user having lower role hierarchy than that of the opportunity owner, is not having access to the "Edit Opportunity Splits" ...
user avatar
1 vote
1 answer
786 views

Accessing Custom Permission Through Javascript

In my dev org, I could do if('{!$Permission.Manage_Advanced_Org_Settings}'){}, however, I tried to package and install in another org and got 'Manage_Advanced_Org_Setting does not exist. Check ...
user avatar
  • 2,319
1 vote
1 answer
424 views

Restrict user to access admin Visualforce pages

In our managed package, we have Visualforce pages that are "public", but there are also some configuration pages that we want to make available only to "admin" user. In other word, we want to be able ...
user avatar
  • 113
3 votes
1 answer
744 views

Custom Permission assign to all users by default

I'm working on creating a Custom Permission within a new Permission Set in a beta managed package. My Custom Permission: <?xml version="1.0" encoding="UTF-8"?> <CustomPermission xmlns="...
user avatar
  • 113
2 votes
1 answer
3k views

Using custom permissions in a formula field

My aim is to create a formula field on user object which validates that a user has been assigned to a particular permission set or not. Step1: I created a custom permission called ...
user avatar
  • 936
-1 votes
1 answer
256 views

SOQL Query within controller Custom Permission

I'm trying to query what custom permission the current user has. I will have to query this in a few places so I was trying to avoid putting it in every single controller class. Maybe putting it in ...
user avatar
0 votes
2 answers
114 views

Open access to a particular user for a particular field of a particular record

A profile doesn't have access to any of the 5( Let's say A,B,C,D,E) fields in the object, however I have to allow a user in the profile to edit field A, that too for certain records. Is it possible? ...
user avatar
  • 497
0 votes
0 answers
19 views

Restricting access to different packages for contractors

Our company is using AppExchange PackageA and AppExchange PackageB that provides similar functionalities and we have signed up MSA with both companies for enhancements. So, developers from PackageA ...
user avatar
4 votes
1 answer
1k views

How do I limit access to a report folder to certain users only?

I need to have a report folder that is accessible to management only, but can't seem to figure it out. We have many folders for various sections of the business, and all users have access to public ...
user avatar
  • 1,387
0 votes
2 answers
563 views

Custom permission vs Hierarchy custom setting

We have some scenario where we need to skip validation and workflow rule to specific profiles.Since these set of profiles may change frequently (SYSADMIN can add/remove profile names to skip). To ...
user avatar
9 votes
1 answer
12k views

SOQL to find All Users with a Custom Permission

I was looking for a little help to find all users with a particular Custom Permission assigned to them, either via Profile or Permission Set.
user avatar
4 votes
1 answer
418 views

Checking if a certain custom permission is enabled in a Profile

Is there a way to programmatically figure out whether a certain custom permission is enabled in User profile? The problem that I'm trying to solve – is that I need some kind of a flag for a small ...
user avatar