function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
pratprat 

Deployment error in Production Only

Hi,

 

I recently had an issue with the salesforce deployment in production only and not in any other full copy environment.

 

Deployment failed with an error and that never re-appeared. But this blocked most of the time in investigating and this part of code that failed got never changed (including triggers).

 

_______________________________________________________________________________________

System.AssertException: Assertion Failed: Unexpected Exception thrown: Update failed. First exception on row 0 with id 0012000000w1KO7AAM; first error: DUPLICATE_VALUE, duplicate value found: <Custom Obj> duplicates value on record with id: 0012000000w1KO6: [] stack

_______________________________________________________________________________________

 

Two Test data create and updated one after other.

 

All the test data are internally created and there is no option of the using the data Org. So this duplicate_value never happen to occurred for ages.

 

When the deployment is re-run the Duplicate_Value exception did not occur and the test passed.

I am sure there is no scenario that proves that test data will be duplicated if the objects created with the "new()".

 

Please can any one suggest if this error has occured to you before and solution you can advise.  Appreciate your help.

 

 

regards,

Prathaban