I have a custom object with the following fields:
I want to make sure there are no two active records that have the field
value__c populated with the same data, so I tried using duplicate rules.
I added a matching rule that matches iff the data in
value__c is the same and then I added a duplicate rule that uses that matching rule with the condition that
active__c is true. This duplicate rule is set to block on creation and on edit if a duplicate is found.
This does not work as I want it though. For reproduction you can do the following:
- create two records
abc(or any other string) on both.
trueon one of them.
trueon the other one too.
The duplicate rule does not execute despite the fact that there are now two active records with the same value.
This seems like a bug to me, but if not, is there a way to do this using duplicate rules?
If there is not, are there any other standard functionalities I can use?
I want to try to solve this without using apex, flows, processes or workflows since they need a little more maintenance.