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.
77
questions
-1
votes
0
answers
8
views
Field sets for Dispatch Console
I have been reading up on using field sets to change the data presented on the dispatch console in field service. I am very interested in doing this, as a field service dispatcher for the company we ...
2
votes
1
answer
44
views
Limiting Custom Component Access in Managed Package
I have a managed package that I have gone through the process to create Permission Sets and associate Custom Permissions to those Permission Sets. After much struggle I found that all of the ...
0
votes
1
answer
42
views
Restricting Visibility of Component Using Custom Permission Not Working
I am trying to restrict the visibility of a managed package component that is deployed as a tab on an Account record. I have created the permission set and included a custom permission in that ...
0
votes
1
answer
30
views
Having difficulties hiding a picklist value with a Custom permission and a Validation rule
I need to be able to hide one picklist value from a field on a Custom object from a set of users. I've created a Custom permission (View All Statuses), and a Permission set to assign to users who ...
0
votes
1
answer
22
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 &...
0
votes
0
answers
56
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 {...
0
votes
0
answers
95
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, ...
0
votes
0
answers
201
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 "@...
0
votes
1
answer
62
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 ...
1
vote
1
answer
74
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 ...
1
vote
1
answer
2k
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 ...
-1
votes
1
answer
85
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
1
vote
1
answer
734
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 ...
-2
votes
1
answer
8k
views
SOQL Find all Permission Sets with a given Custom Permission [closed]
How to get all permission set has a custom permission.
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 ...
0
votes
2
answers
2k
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 ...
0
votes
1
answer
348
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 ...
0
votes
1
answer
104
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 = '...
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.
2
votes
1
answer
631
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
};...
1
vote
0
answers
576
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 {!$...
1
vote
1
answer
2k
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)...
1
vote
1
answer
2k
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 ...
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 ...
0
votes
1
answer
1k
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 ...
-1
votes
2
answers
935
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 .
...
0
votes
1
answer
985
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 ...
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 ...
0
votes
1
answer
495
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 ...
0
votes
1
answer
4k
views
Custom permission assignment programmatically in salesforce [closed]
How can we assign custom permission to user via apex coding
1
vote
1
answer
4k
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),
$...
1
vote
1
answer
6k
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 (...
0
votes
0
answers
356
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($...
0
votes
1
answer
122
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 ...
-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.
0
votes
1
answer
5k
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 ...
0
votes
1
answer
198
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 ...
6
votes
2
answers
2k
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 ...
2
votes
2
answers
557
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 ...
1
vote
1
answer
740
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 ...
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....
4
votes
1
answer
244
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 ...
4
votes
2
answers
713
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 ...
2
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 ...
0
votes
1
answer
155
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?
...
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 ...
3
votes
1
answer
210
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"...
5
votes
2
answers
1k
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 ...
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 ...
4
votes
0
answers
275
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 ...