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
1 vote
1 answer
93 views

Which context do Record-Triggered Flows run in?

According to the table in the middle of this Salesforce documentation, record-triggered Flows run in system-context. At the bottom of this unofficial sf documentation, it says record-triggered Flows ...
parkerbbrown's user avatar
-1 votes
1 answer
62 views

Remove "Match Gantt Dates "- FSL

I want to hide this but I am not able to find the exact custom permission for this. Please help me out
Aditya Kumar Kannaujia's user avatar
1 vote
1 answer
207 views

Restrict users from changing Opportunity Stage thorugh UI

I have a task to prevent users from changing the Opportunity Stage manually, except for a subset of users which do not share the same profile. I created a custom permission and a new permission set ...
Gabriel Gonzalez's user avatar
-4 votes
1 answer
3k views

SOQL Find all Permission Sets with a given Custom Permission [closed]

How to get all permission set has a custom permission.
Ragul's user avatar
  • 1
0 votes
1 answer
754 views

Custom Permission is not working to hide/unhide Lightning quick action on Lightning Record Page

I need to Hide/Unhide Quick Action button on the Lightning record page based on the permission set. Steps that I followed: Created a Custom Permission and permission set and added the custom ...
indrasen neelam's user avatar
0 votes
2 answers
765 views

Assign Custom permission to profile using Apex

Are there any solutions that allow assigning Custom permission to Profiles using apex? I know about the object SetupEntityAccess. But it is for linking Custom Permission and Permission Set. But I ...
Vadym's user avatar
  • 103
0 votes
1 answer
191 views

Trying to check user permission set from related object validation rule

Submitter field in the object has lookup to the user object. I am trying to create validation rule where only user with a specific custom permission set can be assigned to submitter field. But cannot ...
Gul's user avatar
  • 1
0 votes
1 answer
71 views

Change control access of custom objects for different users through apex

This is a generalized code of what I am trying to do. TestNested__c[] myCustomObjList = [SELECT id, ownerId from TestNested__c]; String platformUserId = '005DP000007Yji5YAC'; String securityUserId = '...
AnxiousConcert's user avatar
2 votes
2 answers
2k views

Access User Custom Permission in Aura Component?

What's the best way to check the running users custom permission in an Aura component? I can only find documentation around LWC but in this instance I have to use Aura.
jonny-harte's user avatar
2 votes
1 answer
416 views

LWC jest mock custom permission: jest.mock( "@salesforce/customPermission/my-custom-permission",

I am mocking custom permission successfully like this: jest.mock( "@salesforce/customPermission/my-custom-permission", () => { return { default: true };...
Mira's user avatar
  • 21
1 vote
0 answers
217 views

Access Custom Permission on a related User in Flow

Let's say I have a Custom Permission Can_Do_the_Thing, which I've assigned to Users with a Permission Set. Within Flow, I know that I can check if the running user has the Custom Permission using {!$...
nai888's user avatar
  • 11
1 vote
1 answer
809 views

Assign Custom Permission in Test class

I have a validation rule AND( ISPICKVAL(Submission_Handover_Process_Status__c, 'Awaiting Validation'), ISCHANGED(Submission_Handover_Process_Status__c), NOT($Permission.Submission_Handover)...
Salman Khan's user avatar
1 vote
1 answer
967 views

FeatureManagement.checkPermission not returning expected result

I'm trying to check whether a user exporting a report has a certain Custom Permission for a Transaction Security Condition Class. I created the Custom Permission, created a Permission Set, enabled the ...
rg_'s user avatar
  • 259
1 vote
1 answer
716 views

Mute a Custom Permission within a Permission Set Group

We have a beta release of some new functionality being rolled out and we want to only allow users within the beta to see the new features while at the same time we want to mute the users ability to ...
Xtremefaith's user avatar
  • 4,530
0 votes
1 answer
811 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 ...
SFDCSai's user avatar
  • 147
0 votes
2 answers
662 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 . ...
salesforcedev's user avatar
0 votes
1 answer
710 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 ...
Sumesh Chandran's user avatar
2 votes
2 answers
3k 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 ...
Diego Cominazzini's user avatar
0 votes
1 answer
345 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 ...
David Culbreth's user avatar
0 votes
1 answer
3k views

Custom permission assignment programmatically in salesforce [closed]

How can we assign custom permission to user via apex coding
Datta shinde's user avatar
1 vote
1 answer
3k 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), $...
ECallpani's user avatar
  • 113
1 vote
1 answer
4k 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 (...
cropredy's user avatar
  • 69.9k
0 votes
0 answers
326 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($...
Ashraf Baker's user avatar
0 votes
1 answer
104 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 ...
Sudhir Balijepalli's user avatar
-1 votes
2 answers
2k 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.
Isuru Buddhika Herath's user avatar
0 votes
1 answer
3k 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 ...
Brian Lewis's user avatar
0 votes
1 answer
164 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 ...
user58's user avatar
  • 5
6 votes
2 answers
1k 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 ...
Nick C's user avatar
  • 6,446
2 votes
2 answers
416 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 ...
Oleksander Vlasenko's user avatar
1 vote
1 answer
656 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 ...
Robert Hyatt's user avatar
0 votes
1 answer
1k 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....
Andre g's user avatar
  • 21
4 votes
1 answer
232 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 ...
Robert Sösemann's user avatar
4 votes
2 answers
604 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 ...
Robert Sösemann's user avatar
0 votes
1 answer
1k 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 ...
Rahul's user avatar
  • 3
0 votes
1 answer
103 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? ...
Remsey's user avatar
  • 3
4 votes
1 answer
2k 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 ...
Robert Hyatt's user avatar
3 votes
1 answer
197 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"...
Robert Hyatt's user avatar
4 votes
1 answer
893 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 ...
Andrea P.'s user avatar
  • 143
1 vote
3 answers
1k 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 ...
Krishna Kanth Juluru's user avatar
4 votes
0 answers
258 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 ...
david's user avatar
  • 61
0 votes
0 answers
174 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? ...
Pratious Rekhansh's user avatar
0 votes
2 answers
41 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 ...
Sandy's user avatar
  • 25
0 votes
1 answer
548 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 ...
Kamal Thakur's user avatar
0 votes
0 answers
1k 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 ...
Tom Casillas's 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?
Dedo's user avatar
  • 4,991
2 votes
2 answers
871 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 ...
Fernando Gavinho's user avatar
0 votes
1 answer
457 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" ...
Eduard's user avatar
  • 5,077
3 votes
1 answer
475 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 ...
mseehase's user avatar
23 votes
3 answers
28k 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 ...
Adrian Larson's user avatar
  • 149k
2 votes
0 answers
357 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'...
Justin's user avatar
  • 21