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
AbAb 

This price definition already exists in this price book Error inspite of duplicaes

Hello,

I am quering a Prive book Entry, and i made sure that there are no fuplicates,

but still i have below error
 
Line: 122, Column: 1
System.DmlException: Insert failed. First exception on row 7; first error: FIELD_INTEGRITY_EXCEPTION, This price definition already exists in this price book: []

Any suggestions
Best Answer chosen by Ab
SRKSRK

1) are you inserting a single record or muliple records in a list ?

2) if you inserting a list try using database.insert(list,false); and see if some record get pass and some got fail 

3) your list can have duplicate records may be its not in database