Input & Output

Update index for specific records

The doIndex(Set<Id> recordSet) method allows you to initiate a targeted indexing process for specific Salesforce records. By providing a set of record IDs, this method ensures only those records are indexed, making it an efficient solution for preparing data for Plauti Deduplicate operations without indexing the entire object.

Method Signature

Method Name: doIndex

static Boolean doIndex(Set<Id> recordSet)

Parameters

Type

Variable

Description

Set<Id>

recordSet

  • A set of Salesforce record IDs to index.
  • All IDs in the set must belong to the same object type (e.g., Contact, Lead, or Account).
  • Ensure the object is configured in the DC Setup.

Output

  • true: The indexing process has successfully started.
  • false: The process failed to start.

Apex Example

This snippet starts the indexing process for a specific set of record IDs using dupcheck.dc3Api.doIndex(), then logs whether the process was successfully initiated or failed.

// Define the set of record IDs to index
Set<Id> recordSet = new Set<Id>{'003J800000A3JluIAF', '003J800000A3JlkIAF'};

// Execute the indexing process
Boolean isIndexingStarted = dupcheck.dc3Api.doIndex(recordSet);

// Optionally log the result
if (isIndexingStarted) {
    System.debug('Indexing process successfully started for record IDs: ' + recordSet);
} else {
    System.debug('Failed to start the indexing process for record IDs: ' + recordSet);
}