You need to sign in to do that
Don't have an account?
TehNrd
System.ListException: Before Insert or Upsert list must not have two identically equal elements
This makes absolutely no sense to me. I am trying to insert two OpportunityLineItems that are exactly the same but I get this exception. What good reason is there to stop the insertion of two Records that are the same?
I understand if this was an upsert operation as you can't insert and update and the same time but I am inserting two brand new OpportuntiyLineItem records.
Thanks,
Jason
Message Edited by TehNrd on 09-24-2008 04:48 PM
I understand if this was an upsert operation as you can't insert and update and the same time but I am inserting two brand new OpportuntiyLineItem records.
Thanks,
Jason
Message Edited by TehNrd on 09-24-2008 04:48 PM
Figure it out. I had to redo some of my code and I added a loop to the code and then forgot to put my opp initiation statement in the loop. So really it was not two records that were the same but one record in the List twice.
Here is the nitty gritty.
Sigh.....I wasted too much time trying to figure this out :smileysad:.
Message Edited by TehNrd on 09-24-2008 05:13 PM
All Answers
Figure it out. I had to redo some of my code and I added a loop to the code and then forgot to put my opp initiation statement in the loop. So really it was not two records that were the same but one record in the List twice.
Here is the nitty gritty.
Sigh.....I wasted too much time trying to figure this out :smileysad:.
Message Edited by TehNrd on 09-24-2008 05:13 PM
Thanks for this - helped me work out where I had gone wrong.
:)
Thanks - this helped me too.
Thank you so much. It helped me too.. N saved my lots of time
Just Awsome. Thank you for the fix provided :)
Hi,
If we have more than one record than only last record will save in the list.if we initialized list under the for loop .
its not working when we have more than one record .
you have to Insert the Records outside the for loop.Can you post the code once so that it will be more clear where you went wrong
But why this is happening what is the exact reason, it should work if I am initiating it outside the loop