Timeline for Upsert and External id specification in APEX DML
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 25, 2014 at 6:36 | comment | added | Davin Casey | It's normal DML behaviour, see here: salesforce.com/us/developer/docs/apexcode/Content/… " If the key is not matched, then a new object record is created. If the key is matched once, then the existing object record is updated. If the key is matched multiple times, then an error is generated and the object record is neither inserted or updated." | |
Jun 25, 2014 at 2:32 | comment | added | sfdc99999 | I understand i have been duplicating..this is for academic purpose to understand whats wrong if a list has duplicate external ids and tries to upsert..can you please explain whats happening at memory level and why its failing..rather than fix..why its not taking second record as second update on same db record | |
Jun 24, 2014 at 20:03 | comment | added | Davin Casey | I'm with you on that one! | |
Jun 24, 2014 at 18:22 | comment | added | Ricky Hewitt | +1 for using a map to ensure no duplicate Ids. However I still feel the OP should fix the loop vs letting a data type cover the bad design :) | |
Jun 24, 2014 at 15:24 | history | answered | Davin Casey | CC BY-SA 3.0 |