Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

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
1 answer
18 views

Managed custom permission B2BCommerceAdmin is not accessible

I installed the package B2B Commerce for Visualforce in a developer org. I follow the instructions in "Salesforce B2B Commerce for Visualforce" help page. The instructions say to add the &...
fredbe's user avatar
  • 135
0 votes
0 answers
48 views

Deploy Custom Permission via Apex

I am facing this when implementing a custom permission xml, but when deploying, the status is success, but it is empty, no element is deployed. public without sharing class CustomPermissionController {...
Maicon Douglas Rodrigues Garci's user avatar
0 votes
0 answers
58 views

how to create a custom permission salesforce with apex?

good morning everyone, I'm developing a better way to manage access and permissions with custom permissions, and I'm having some problems, to create one, I need to do a deploy, but I get error 500, ...
Maicon Douglas Rodrigues Garci's user avatar
0 votes
0 answers
94 views

Custom Permission access check is always returning True in Managed Package

I have created a custom permission and included it as part of 2GP package, after installing my package to the scratch org, customPermission always return true import hasAppPermission from "@...
R_M_R's user avatar
  • 1
0 votes
1 answer
48 views

Is there any disadvantage or limitations when using Custom Permssion in Validation Rule?

I just need to confirm your experienced, if there is something I need to be aware of in using Custom Permission? We are hesitant to used the custom permission assigned to permission set to create ...
Kato's user avatar
  • 1
1 vote
1 answer
49 views

Flow Run Continues Even Without Permission

I am testing my package which includes a flow that is restricted with the users with particular custom permission and this restriction is applied inside of the Decision element of the flow (like in ...
Hasan Tokul's user avatar
1 vote
1 answer
1k 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
77 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
605 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
-2 votes
1 answer
5k 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
  • 541
0 votes
1 answer
1k 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
1k 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
  • 113
0 votes
1 answer
284 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
94 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
3 votes
2 answers
3k 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
525 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
417 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
1k 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
1k 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
1k 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,570
0 votes
1 answer
966 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
  • 167
-1 votes
2 answers
845 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
892 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
4k 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
422 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
4k 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
5k 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
  • 71.8k
0 votes
0 answers
342 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
114 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
4k 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
191 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,740
2 votes
2 answers
498 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
714 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
238 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
677 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
138 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
203 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
975 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
  • 153
1 vote
3 answers
2k 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
269 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
183 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
46 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
600 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