---
schema_version: "1"
id: 700d45eff4cfb0fc9d38d2c935451d9381ba46e50757fe23dd1f010e83d0f7a2
title: DuplicateRule
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_duplicaterule.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_duplicaterule.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 81f2034efa5e5f6ab7851a91b336c25f1c54ba10f964cca2dac20bf75bbeebc1
description: Represents a duplicate rule for detecting duplicate records.
---
# DuplicateRule

Represents a duplicate rule for detecting duplicate records.

## Supported Calls

describeSObjects(), describeLayout(), query(), retrieve(), search()

## Special Access Rules

As of Summer ’20 and later, only users with the View Setup and Configuration permission can access this object.

## Fields

| Field Name | Details |
| --- | --- |
| DeveloperName | 
Type

string

Properties

Filter, Group, Sort

Description

The developer name for the duplicate rule.

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

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















 |
| IsActive | 

Type

boolean

Properties

Defaulted on create, Filter, Group, Sort

Description

Indicates whether a duplicate rule is active (true) or not (false). This field is read only.



 |
| Language | 

Type

picklist

Properties

Filter, Group, Restricted picklist, Sort

Description

The language for the duplicate rule.



 |
| LastViewedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The timestamp when the current user last viewed this record or list view. This field is available in API version 41.0 or later.



 |
| MasterLabel | 

Type

string

Properties

Filter, Group, Sort

Description

The label for the duplicate rule.



 |
| NamespacePrefix | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

The namespace prefix that is associated with this object. Each Developer Edition org 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 orgs, NamespacePrefix is set to the namespace prefix of the org for all objects that support it, unless 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 org of the package developer.
- In orgs that are not Developer Edition orgs, NamespacePrefix is set only for objects that are part of an installed managed package. All other objects have no namespace prefix.





 |
| SobjectSubtype | 

Type

picklist

Properties

Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort

Description

The subtype of object the duplicate rule is defined for. This field is available in API version 39.0 or later.

Possible values are:

- None
- PersonAccount

The default value is None.



 |
| sObjectType | 

Type

picklist

Properties

Filter, Group, Restricted picklist, Sort

Description

The type of object the duplicate rule is defined for.

Possible values are:

- Account
- Contact
- Individual
- Lead





 |

## Usage

You can use the API to view a duplicate rule’s details. To create, edit, or delete duplicate rules, use the UI.

Use DuplicateRule to get the sObject type.

DuplicateRule is unavailable in some orgs.