Print this page

System Validation Error displays when Cloning Opportunity with products but does not show when Cloning without Products

Knowledge Article Number 000002464
Description

This error, or similar error, displays as a validation rule error when cloning an opportunity with products.

 

Error: Invalid Data.
Review all error messages below to correct your data.
java.sql.SQLException: ORA-00001: unique constraint (CORE.AK2CUSTOM_UNIQUE_VALUE) violated ORA-06512: at "HAPPY.CCUSTOMFIELDDATA", line 616 ORA-06512: at "HAPPY.CCUSTOMFIELDDATA", line 181 ORA-06512: at "HAPPY.CCUSTOMFIELDDATA", line 74 ORA-06512: at "HAPPY.CCUSTOMFIELDDATA", line 38 ORA-06512: at "HAPPY.CCUSTOMFIELDDATA", line 772 ORA-06512: at "HAPPY.SOPPLINEITEM", line 951 ORA-06512: at line 1 : {call sOppLineItem.insert_opplineitems(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)})}


 

Resolution

This error displays because there is a custom field on Opportunity Products that is set as "Unique".  As such, the unique value cannot be replicated and is displaying the "Unique Constraint" validation error.

 

To address this issue, there are a couple of options:
 

1. Edit the unique field(s) under

  • Setup | Customize | Opportunities | Opportunity Products | Fields
  • Remove the "Unique" flag.

 

2. When cloning Opportunities, clone only the Opportunity, not the Products.

 

3. It could be possible to develop custom Apex or Visualforce code which would clear the unique field(s) values when cloning Opportunity Products so that the Unique constraint is not encountered.





promote demote