Enable and Disable duplicate detection

This topic covers information on how to enable and disable duplicate detection in Dynamics 365.

Enable duplicate detection

Before running duplicate detection, enable it for each of the following:

  • Globally (for all entities in the organization).

  • For an entity.

  • For specific operations.

Note

You must enable duplicate detection in all three areas to detect duplicates for an entity and for operations on an entity.

Enable duplicate detection globally

Enable duplicate detection for an entity

Enable duplicate detection for specific operations

  • Set the following attributes to true:

    • Organization.IsDuplicateDetectionEnabledForOnlineCreateUpdate. Create and update records in Common Data Service by using the Web application or Dynamics 365 for Outlook. This attribute enables or disables duplicate detection for records created or updated with the CreateRequest and UpdateRequest messages. However, it does not affect records created or updated with the IOrganizationService.Create and IOrganizationService.Update methods.

    • Organization.IsDuplicateDetectionEnabledForOfflineSync. Synchronize offline records when Dynamics 365 for Outlook goes from offline to online.

    • Organization.IsDuplicateDetectionEnabledForImport. Import bulk data.

    Note

    You do not have to publish the duplicate detection rules to enable duplicate detection for these operations. However, you must publish the duplicate detection rules before you perform the operations.

Disable duplicate detection

Disable duplicate detection globally or for an entity type by unpublishing the duplicate detection rules or by deleting the published rules.

Disable duplicate detection globally

To disable duplicate detection globally, use the UpdateRequest message to set the Organization.IsDuplicateDetectionEnabled attribute to false. This automatically unpublishes all duplicate detection rules for all entity types in the organization.

Disable duplicate detection for an entity

To disable duplicate detection for an entity type, do one of the following:

  • Use the UpdateEntityRequest message to set the IsDuplicateDetectionEnabled property to false. This automatically unpublishes all duplicate detection rules for an entity type. This removes duplicate detection support for the entity type and you cannot create a new duplicate detection rule for this entity type.

  • Unpublish all duplicate detection rules for an entity type by using the UnpublishDuplicateRuleRequest message.

Delete published duplicate detection rules

Delete all published rules in the system to disable duplicate detection globally, or delete published rules for specific entity types by using the IOrganizationService.Delete method.

See Also

Duplicate detection
Run duplicate detection
Duplicate rule entities