I'm using the Product object and store the product sku within the StockKeepingUnit field. According to the Winter 18 release notes, this field is considered unique, which is totally fine and expected for me.
However, when I use apex testing classes, my product2 testing records that I create for testing are conflicting with the product2 records already part of my Salesforce instance. This doesn't make a lot of sense to me because I am not using seeAllData=true
in my testing classes, those records in my Salesforce instance should not get into conflict with my testing records.
Here is the error message I get when I try to insert a test record that has a product sku equal to a product2 record already part of my Salesforce instance.
System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, A Product with this SKU already exists.: [StockKeepingUnit]