You can define one or more predefined filters per object at the DC Setup page, at the "Predefined Filter" tab.
To manage your predefined filters:
- Go to the DC Setup tab.
- At left, select the object to manage the filters for.
- On the <Object> Setup page, go to tab Predefined Filters.
- Add, edit or delete filters.
Adding a new Predefined Filter
Add a new Predefined Filter by clicking the Add Filter button on the top right of the page.
Configuring a Predefined Filter
Configure a new or existing predefined filter by adding one or multiple fields to filter on. For each field, define an expression (operator) and a value. Add a new filter field line by clicking the "+" icon.
Each defined field is referred to by a filter line number, which can be used in filter logic.
Filter Logic
By setting a filter logic, you indicate how the filter fields should be applied. Enter the filter line numbers, separated by a filter logic operator (AND or OR), and grouped with brackets. For example, (1 AND 2) OR 3 finds records that match both Filter 1 and Filter 2, or Filter 3.
In the below example, we entered 2 filter lines and created a logic that states that both filter lines should equal the given value: (1 AND 2). With this specific filter logic, only records that qualify for both filter lines will be used.
Editing a Predefined Filter
You can edit an existing predefined filter as explained above. However, do keep in mind that any changes you make will also be applied in places where you set a predefined filter to be used repeatedly, like in a scheduled job, or when a single job is restarted. In these cases the most recent instance of a predefined filter will be used in all future runs.
Apply the filter in an API Search
The filters can be used in the Apex API. The developer name of the filter as shown in the predefined filter overview is needed for this. The following methods in the dupcheck.dc3Api are available for predefined filters.
doSearchWithFilter (Sobject objectData, String filterDeveloperName)
doSearchWithFilter (Id objectId, String filterDeveloperName)
doSearchWithFilter (Map<String, Object> objectData, String objectPrefix, String filterDeveloperName)
doDirectProcess(Id recordId, String filterDeveloperName)