Skip to main content

#Restriction Rules0 debatiendo

Hi Trailblazers,

 

I need to create a restriction rule to restrict records based on some criteria and restrict for particular profile but I'm unable to select the profile name in restriction rules

 

There is no option to select profile name instead they have an option to select ProfileId.

 

Anyone knows how to do with restriction rules with profile name? 

 

#Restriction Rules  #Identity & Access Management

1 comentario
  1. 10 jul 2025, 13:58

    Hi @Sahil Jain

     

    The "Permission Criteria" type is designed to be related to Custom Permissions only, therefore you cannot directly select a Profile.  

     

    In order to do what you want, you should first create a Custom Permission and assign it to the desired Profile. Then select your Custom Permission with operator equals true. This means that any user that has the custom permission (should it be from his profile or any Permission Set that has the custom permission) will benefit from the Restriction Rule.

0/9000

Hello. 

I have set up a couple of restriction rules based on a checkbox field I added to the User Object. 

 

Restriction Rule 1

(We want this user to see all of the  record values if boolean value is 'True')

 

User Criteria

Select which users this restriction rule applies to.

*Criteria Type =  User Criteria

 

Field = $User.Corporate__c

Operator = Equals

Type = Boolean

Value = True

Criteria Type  = Record Field

Field = [c2g__codaPurchaseInvoiceExpenseLineItem__c].c2g__Dimension1__r.Id

Operator = Equals

Type = ID

Value = a8Y1U000000LN3pUAG,a8Y1U000000LN4BUAW, a8Y1U000000LN3nUAG, a8Y1U000000LN3tUAG, a8Y1U000000LN4IUAW, a8Y1U000000LN4AUAW, a8Y1U000000LN3uUAG, a8Y1U000000LN49UAG, a8Y1U000000LN3vUAG, a8Y1U000000LN4NUAW, a8Y1U000000LN3lUAG, a8Y1U000000LN46UAG, a8Y1U000000LN3ZUAW, a8Y1U000000LN3yUAG, a8Y1U000000LN3mUAG, a8Y1U000000LN44UAG, a8Y1U000000LN48UAG, a8Y1U000000LN3fUAG

 

Restriction 2

(We want this user to see all of the record values if boolean value is 'False' with the exception of value = a8Y1U000000LN3pUAG )

 

User Criteria

Select which users this restriction rule applies to.

*Criteria Type =  User Criteria

 

Field = $User.Corporate__c

Operator = Equals

Type = Boolean

Value = False

Criteria Type  = Record Field

Field = [c2g__codaPurchaseInvoiceExpenseLineItem__c].c2g__Dimension1__r.Id

Operator = Equals

Type = ID

Value = a8Y1U000000LN4BUAW, a8Y1U000000LN3nUAG, a8Y1U000000LN3tUAG, a8Y1U000000LN4IUAW, a8Y1U000000LN4AUAW, a8Y1U000000LN3uUAG, a8Y1U000000LN49UAG, a8Y1U000000LN3vUAG, a8Y1U000000LN4NUAW, a8Y1U000000LN3lUAG, a8Y1U000000LN46UAG, a8Y1U000000LN3ZUAW, a8Y1U000000LN3yUAG, a8Y1U000000LN3mUAG, a8Y1U000000LN44UAG, a8Y1U000000LN48UAG, a8Y1U000000LN3fUAG

 

When I active both of these restriction rules the users that fall under Restriction Rule 1 are able to see all the values. However, those users that fall under Restriction 2 are not able to see any of the values. This is not how this should behave. Neither set of users have view all or modify all to the object. Any recommendations?

Please let me know if further information is needed.

 

Thank you,

Nancy

 

#Restriction Rules

1 respuesta
  1. 4 nov 2023, 12:23

    Can these users in group 2 see these records before the Restriction Rule is active? A restriction rule can't open up access to records, only filter access to records that they already have access to. Also, using the record Ids like this in a rule is really not recommended. Is there a different way to identify these records?

0/9000

One of our top customers is insisting on stricter security for their information. One way management can see this happening is by creating a Permission Set so only Users with this Permission Set can see the customer's Objects (Account, Contacts, Cases, Assets, Opportunities etc). Leaving those Users without this special Permission Set to see all other Objects.

The native levels of data access for Objects or Records seem targeted to be broader sweeps (i.e. a User can't edit any Opportunity). This is too crude. I need a more targeted access control to meet management's requirements.

I wondered if Restriction Rules could be set up to sequester this picky customer's Objects and give access only to select Users.

Has anyone done this before? Is there an article anywhere on how to set this up?

#Restriction Rules #Object Permissions #Security #User Management #Data Management

2 respuestas
  1. Eric Burté (DEVOTEAM) Forum Ambassador
    10 oct 2023, 21:44

    Hello @Emma Taylor, just for information, that may have been a good  option... but restriction rules are not available yet for accounts/contacts ; it is only available for custom objects, external objects, contracts, events, tasks, time sheets, and time sheet entries.

    https://help.salesforce.com/s/articleView?id=sf.security_restriction_rule_create.htm&type=5

    Playing with OWD or muting permissions will concern all records of the private/muted object. you may handle field-level permissions but that requires to track all fields.

    That means you should still probably play OWD + sharing rules.

    Eric

0/9000

Hi,

Are you able to extend the Restriction Rules to include Notes and Files? We have a need to limit visibility to both of these in addition to Events.

Thanks,

Lori

2 comentarios
  1. 5 may 2021, 23:28

    If your question is related to experience cloud (aka communities):

    File access on records for community users is based on the "Visibility" setting for each file.

    For each record a file is shared with, the share can have a visibility of InternalUsers (so community/guest users can't access it) or AllUsers (so they can).

    Here is a post regarding how to change the default (once communities are enabled, newly uploaded files default to InternalUsers, but for some records, an org might want them to be public):

    files not visible to community users when sharing set to "set by record" - Ideas - Salesforce Trailblazer Community (

    https://trailblazer.salesforce.com/ideaView?id=0873A000000E7mrQAC

    )

    The same logic can be used to make it private.

    There is also a UI option in lightning to change this. Go to a file > share settings > who can access > there is a toggle for "customer access"

    Here is an overview of file visibility:

    File Visibility and Sharing in Experience Cloud Sites (

    salesforce.com

    )

    (

    https://help.salesforce.com/articleView?id=sf.networks_files_visibility_and_sharing.htm&type=5)
0/9000