1. Create the Combined Phone fields
In this step, we are creating the combined phone fields. We will use them later in the duplicate prevention scenario. For this example, we are using the fields Phone1 and Phone2:
- Navigate to Salesforce Setup menu.
- Navigate to Object Manager.
- Select the Object to which you want to add the Combined Phones field.
- Now, on the left menu, navigate to the "Fields & Relationships" page.
- Click the 'New' button.
- From the options available on the page, choose 'Formula' and click 'Next'.
- Fill the blank fields:
'Field Label' with 'Combined Phones'
'Field Name' with 'Combined _ Phones'
Under 'Formula Return Type' select "Text" and click 'Next' - As a formula, insert the fields (API names), separated by a white space. In our example, those are the “Phone1” and “Phone2" fields.
Example of Combined Phone fieldsPhone1 + " " + Phone2
- Under 'Blank fields handling' select "Treat blank fields as blanks". Click Next.
- Apply the field-level security of your choice and click 'Next'.
- Click 'Save'.
2. Create a scenario with the Combined Phone fields
- Navigate to DC Setup page.
- Select the Object for which you want to do a cross-check comparison in duplicate prevention.
- Add the newly created field by clicking on the 'Add new Fields' button. From the drop-down menu that will show, select "Combined Phones".
- For 'Matching Method' choose "Partial Fuzzy Light".
- Set the 'Threshold level' to 100%. If you want fuzzy results set the threshold level at 95%.
- Apply the scenario to 'Manual Insert Prevention' and 'Manual Update Prevention'.
Example Scenario
3. (Re-)Create the Search Index
The Search Index is necessary when the new field you are going to cross-check is custom and has never been indexed before by the Duplicate Check Search Index, but even if you already have created a Search Index, please re-create it now.
- Go to DC Setup.
- On the left hand side, under Object Setup, select the Object you want to create a Search Index for.
- On the *Object* Settings tab, make sure the Search Index option is enabled, and the search index is configured in the Advanced Settings > Index. Read more here.
- Go to the Index Batch tab.
- Click the Start button and select Create Search Index.
Click here to watch a short video of how to enable and create the Search Index.