FieldRestrictionRule

Represents a field visibility rule that controls whether a field is visible to a user, based on the field’s inclusion in the PersonalInfo_EPIM field set. If Enhanced Personal Information Management setting was enabled before Spring ’22, field visibility is based on the field’s compliance categorization.

Version 

Introduced in API version 52.0.

Supported SOAP API Calls 

create(), delete(), describeSObjects(), query(), retrieve(), update(), upsert()

Supported REST API Methods 

DELETE, GET, HEAD, PATCH, POST, Query

Special Access Rules 

    • To access this object, you must have the Manage Sharing permission.
    • To create and manage Employee field visibility rules, you must be assigned a Workplace Command Center permission set license and the Provides access to Workplace Command Center features system permission.
    • To create and manage User field visibility rules, you must enable Digital Experiences and the Enhanced Personal Information Management feature.

Fields 

Classification 

  • Type: multipicklist

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 52.0

  • Description: Required. The data classification compliance categorization or field set that is targeted by the rule. The rule applies to fields that are marked with this categorization or included in this field set. If you enabled Enhanced Personal Information Management before Spring ‘22 (API version 54.0), you can use Salesforce’s default compliance categorization values or values that you add yourself. If you enabled Enhanced Personal Information Management after Spring ‘22 (API version 54.0), use the PersonalInfo_EPIM field set or a field set that you add yourself.

ClassificationType 

  • Type: picklist

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Restricted picklist, Sort

  • Introduced: API version 54.0

  • Description: The type of classification method used in your org. If you enabled Enhanced Personal Information Management before Spring ‘22 (API version 54.0), use ComplianceCategory. If you enabled Enhanced Personal Information Management after Spring ‘22, use FieldSet.

The default value is ComplianceCategory.

  • Possible values:

    • ComplianceCategory — ComplianceCategory (default)

    • FieldSet — FieldSet

  • Default value: ComplianceCategory

Description 

  • Type: textarea

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 52.0

  • Description: Required. The description of the rule.

DeveloperName 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Sort

  • Description: The unique name for the FieldRestrictionRule object.

This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is automatically generated, but you can supply your own value if you create the record using the API.

When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record.

Note

Only users with View DeveloperName OR View Setup and Configuration permission can view, group, sort, and filter this field.

Note

EnforcementType 

  • Type: picklist

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Restricted picklist, Sort

  • Introduced: API version 52.0

  • Description: Required. The type of rule.

  • Possible values:

    • Scoping — Scoping (default) — Do not use.

    • Restrict — Restrict — Do not use.

    • FieldRestrict — FieldRestrict — Field visibility rule. Only this value is valid.

    • D360_Restrict — D360_Restrict

  • Default value: Scoping

FullName 

  • Type: string

  • Required: No

  • Properties: Create, Group, Nillable

  • Introduced: API version 52.0

  • Description: Required. The full name of the associated FieldRestrictionRule in Metadata API. The full name can include a namespaceprefix.

Query this field only if the query result contains no more than one record. Otherwise, an error is returned. If more than one record exists, use multiple queries to retrieve the records. This limit protects performance.

IsActive 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 52.0

  • Description: Indicates whether the rule is active (true) or not (false). The default value is false.

  • Default value: false

Language 

  • Type: picklist

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort

  • Description: The language of the field visibility rule. The value for this field is the language value of the org.

  • Possible values:

    • en_US — English

    • de — German

    • es — Spanish

    • fr — French

    • it — Italian

    • ja — Japanese

    • sv — Swedish

    • ko — Korean

    • zh_TW — Chinese (Traditional)

    • zh_CN — Chinese (Simplified)

    • pt_BR — Portuguese (Brazil)

    • nl_NL — Dutch

    • da — Danish

    • th — Thai

    • fi — Finnish

    • ru — Russian

    • es_MX — Spanish (Mexico)

    • no — Norwegian

ManageableState 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Nillable, Restricted picklist, Sort

  • Description: Indicates the manageable state of the specified component that is contained in a package.

  • Possible values:

    • beta — beta

    • deleted — deleted

    • deprecated — deprecated

    • deprecatedEditable — deprecatedEditable

    • installed — installed

    • installedEditable — installedEditable

    • released — released

    • unmanaged — unmanaged

MasterLabel 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Sort

  • Description: Required. Label for the field visibility rule.

Metadata 

  • Type: complexvalue

  • Required: No

  • Properties: Create, Nillable, Update

  • Introduced: API version 52.0

  • Description: The field visibility rule’s metadata.

Query this field only if the query result contains no more than one record. Otherwise, an error is returned. If more than one record exists, use multiple queries to retrieve the records. This limit protects performance.

NamespacePrefix 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: The namespace prefix associated with this object. Each Developer Edition organization that creates a managed package has a unique namespace prefix. Limit: 15 characters. You can refer to a component in a managed package by using the namespacePrefix__componentName notation.

The namespace prefix can have one of the following values:

  • In Developer Edition organizations, the namespace prefix is set to the namespace prefix of the organization for all objects that support it. There is an exception if an object is in an installed managed package. In that case, the object has the namespace prefix of the installed managed package. This field’s value is the namespace prefix of the Developer Edition organization of the package developer.
  • In organizations that are not Developer Edition organizations, NamespacePrefix is only set for objects that are part of an installed managed package. There is no namespace prefix for all other objects.

RecordFilter 

  • Type: textarea

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 52.0

  • Description: Required. The criteria that determine which fields are visible to the specified users. For example, the field can check if the logged-in user matches the Employee’s ID.

TargetEntity 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Restricted picklist, Sort

  • Introduced: API version 52.0

  • Description: Required. The object for which you’re creating the rule. Only the Employee and User objects are supported.

  • Possible values:

    • Account — Account

    • AssetAttribute — AssetAttribute

    • AuthSession — AuthSession

    • Case — Case

    • Contact — Contact

    • Contract — Contract

    • DataSpace — DataSpace

    • Employee — Employee

    • Event — Event

    • Event — Event

    • FinancialAccount — FinancialAccount

    • FinancialAccountAddress — FinancialAccountAddress

    • FinancialAccountBalance — FinancialAccountBalance

    • FinancialAccountParty — FinancialAccountParty

    • FinancialAccountStatement — FinancialAccountStatement

    • FinancialAccountTransaction — FinancialAccountTransaction

    • FinancialSecurity — FinancialSecurity

    • FinclAcctPtyFinclAsset — FinclAcctPtyFinclAsset

    • FlexHierNodeSummary — FlexHierNodeSummary

    • IdentityResolution — IdentityResolution

    • IssuedCard — IssuedCard

    • Lead — Lead

    • LoginHistory — LoginHistory

    • MarketSegment — MarketSegment

    • MarketSegmentActivation — MarketSegmentActivation

    • MktCalculatedInsight — MktCalculatedInsight

    • Opportunity — Opportunity

    • PartyFinancialAsset — PartyFinancialAsset

    • PartyFinclAssetAddlOwner — PartyFinclAssetAddlOwner

    • PartyFinclLiabAddlBrwr — PartyFinclLiabAddlBrwr

    • ProcessInstanceStep — ProcessInstanceStep

    • ProcessInstanceWorkitem — ProcessInstanceWorkitem

    • Quote — Quote

    • Task — Task

    • Task — Task

    • TimeSheet — TimeSheet

    • TimeSheetEntry — TimeSheetEntry

    • User — User

    • VerificationHistory — VerificationHistory

    • VideoCall — VideoCall

UserCriteria 

  • Type: textarea

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 52.0

  • Description: Required. The users that this rule applies to, such as all active users or users with a specified role or profile.

Version 

  • Type: int

  • Required: No

  • Properties: Filter, Group, Sort

  • Introduced: API version 52.0

  • Description: Required. The rule’s version number.

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!