I'm getting a really weird behavior from the new Duplicate Catcher in Salesforce. It seems like sometimes, the standard Duplicate Catcher will catch duplicate when doing a bulk operation, but some other times, it won't.
Here's an example where it works (same email, blocking operation if dupe):
Account account1 = new Account(
Name = 'Sample Company',
Email__c = 'test@example.com',
BillingCountry = 'JP'
);
Account account2 = new Account(
Name = 'Some Different Company',
Email__c = 'test@example.com',
BillingCountry = 'JP'
);
insert new Account[]{account1,account2};
Here's an example where it doesn't work (same name - using fuzzy, blocking operation if dupe):
Account account1 = new Account(
Name = 'Sample Company',
Email__c = 'test@example.com',
BillingCountry = 'JP'
);
Account account2 = new Account(
Name = 'Sample Company',
Email__c = 'test2@example.com',
BillingCountry = 'JP'
);
insert new Account[]{account1,account2};
The first scenario seems to work at all time. If I bulkify, add one single record or anything else, it will return an error and prevent from saving - on the UI, Anonymous Apex or through the API.
However, the second scenario doesn't work on bulkify - it will allow users to create dupe records where the name is the same. If I try to do it in two seperate DML requests, the Duplicate Management tool will notify me and prevent from saving, whatever way I used to create that record.
Here's the configuration:
I looked at the documentation and I didn't see any limitation related to that. Have you experienced something alike?
EDIT
It seems like the field was set to unique. Considering this, my conclusion is that duplicate management rules are ignoring duplicate records inside the same transaction.