UserAccessPolicy

Represents a user access policy.

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

Important

Version 

Introduced in API version 56.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 create or modify user access policies, users must have the Manage User Access Policies permission.

Fields 

BooleanFilter 

  • Type: string

  • Required: No

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description: Required. The logic that determines how your user criteria filters are applied in the user access policy. For instance, if you have two user access policy filters with the SortOrder equal to 1 and 2, respectively, the BooleanFilter can be 1 AND 2 or 1 OR 2.

Description 

  • Type: textarea

  • Required: No

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description: Description of the user access policy.

DeveloperName 

  • Type: string

  • Required: No

  • Properties: Create, Filter, Group, Sort, Update

  • Description: The unique name for the user access policy.

The unique name of the object in the API. 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. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object’s name in a managed package and the changes are reflected in a subscriber’s organization. Label is Name.

When creating large sets of data, always specify a unique DeveloperName for each record.

Note

Language 

  • Type: picklist

  • Required: No

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

  • Description: The language of the user access policy.

  • 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:

  • beta

  • deleted

  • deprecated

  • deprecatedEditable

  • installed

  • installedEditable

  • released

  • unmanaged

  • Possible values:

    • beta — beta

    • deleted — deleted

    • deprecated — deprecated

    • deprecatedEditable — deprecatedEditable

    • installed — installed

    • installedEditable — installedEditable

    • released — released

    • unmanaged — unmanaged

MasterLabel 

  • Type: string

  • Required: No

  • Properties: Create, Filter, Group, Sort, Update

  • Description: Label for the user access policy. In the UI, this field is Label.

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.

Order 

  • Type: int

  • Required: No

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 61.0

  • Description: Indicates the order for which active policy is applied when a user meets the criteria for multiple policies. Must be an integer from 0 to 10,000. Only the active policy with the lowest Order value is applied. This field is required only if the Status field is set to Active.

Status 

  • Type: picklist

  • Required: No

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

  • Description: The status of the user access policy.

The default value is Design. If you deploy a policy with a status of Active, the status is changed to Design. A Salesforce admin can then set the status to Active by automating the policy in Setup.

  • Possible values:

    • Design — Design (default)

    • Testing — Testing

    • Migrate — Migrate

    • Updating — Updating

    • Failed — Failed

    • Active — Active

    • Completed — Completed

  • Default value: Design

TriggerType 

  • Type: picklist

  • Required: No

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

  • Description: The type of user record trigger for which this user access policy runs.

  • Possible values:

    • Create — Create — The user access policy runs when a user who matches the policy criteria is created.

    • Update — Update — The user access policy runs when a user who matches the policy criteria is updated.

    • CreateAndUpdate — CreateAndUpdate — The user access policy runs when a user who matches the policy criteria is either created or updated.

Usage 

For more information, see User Access Policies in Salesforce Help.

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