Skip to main content
Andreas Wolf が「#Duplicate Rules」で投稿

We implemented Exact match rules on email on contact name and on Account, which is all fine. But two weeks later we tried to deploy a change set and got a very nice surprise. those duplication rules are firing on the Apex tests and on top of that false positive as our testclasses are all with see all data = false so any test will be in need of provide a new set of test data which of course is done as best practise in an utility class, which now with those duplicate rules activated fails..

 

I have opened a case with support but it seems to be they have no clue what I am talking about, is this a general issue (works as designed) or something which came with Summer 16, unfortunately the event of switching to summer 16 and implement the rule came one week after each other and the last deployment was before both. so I am unsure which cause the false positive on " System Error" there is already a contact with that email[]"

 

If there is no ad hock solution from salesforce we will need to create fields on Leads/ Accounts and Contacts which will be populated by the testclass and be part of the matching rules, which in return means iterating through all inherited apex code to ensure the population of those fields.

 

At this stage we are not able to deploy any change set which contains code as the test classes in production are now failing , thanks to data .com  That much to the idea going back to out of the box, with 3rd party tools we never encountered that issue

 

Any Ideas are appreciated

1 件のコメント
  1. 2025年4月15日 20:19

    Many years later, but just wanted to say that we have run into this multiple times in our own org and it appears to still be an issue. 

     

    We are using Test.isRunningTest() and limiting our queries to constrain the data to records we know won't have dupes, but this may not work in all scenarios.

0/9000