When creating a new contact, I'd like to have a duplicate rule to detect contact duplicates under the very same associated Account (i.e. only check records with the same contact.AccountId value).
But It seems I have to create a new text field in Contact, copy the AccountId from the associated Account in the before-trigger,and use this field in the matching rule in the duplicate rule as the matching rule field doesn't support formula field nor fields in associated object.
This is a big hassle for a small requirement. Any better way? Thanks!