About This Guide

Restriction rules are a record-level access control mechanism that allows you to grant granular visibility to specified users. This guide outlines the different use cases of restriction rules and describes how to set them up using the Tooling or Metadata API.

Restriction rules are available in Lightning Experience in Enterprise, Performance, Unlimited, and Developer editions.

Before creating restriction rules, turn off Salesforce Classic for your org. Find instructions at Turn Off Salesforce Classic for Your Org.

Set up restriction rules in Salesforce by navigating to a supported object in the Object Manager.

You can provide feedback and suggestions for restriction rules in the Restriction Rules group in the Trailblazer Community.

  • Restriction Rules

    Restriction rules let you enhance your security by allowing certain users to access only specified records. They can prevent users from accessing records that can contain sensitive data or information that isn’t essential to their work. Restriction rules are available for custom objects, external objects, contracts, events, quotes, tasks, time sheets, and time sheet entries and can be configured in the Object Manager or through the Tooling or Metadata API.

  • Quick Start: Control Which Tasks the Sales Team Can Access

    In this Quick Start, we create a restriction rule that controls which tasks members of the Sales Team can access.

  • Considerations

    Keep these considerations and limitations in mind while using restriction rules.

  • Example Scenarios

    Refer to these sample restriction rules that fulfill different access requirements. To review how these example scenarios are built in Salesforce, see Restriction Rule Example Scenarios in Salesforce Help.

  • Tooling API Reference

    This section provides more information on the RestrictionRule Tooling API object used to create restriction rules.

  • Metadata API Reference

    This section provides more information on the RestrictionRule Metadata API type used to create restriction rules.

See Also