SFDO-Tooling / CumulusCI

Python framework for building portable automation for Salesforce projects
http://cumulusci.readthedocs.io
BSD 3-Clause "New" or "Revised" License
363 stars 242 forks source link

Error during upsert on identical DeveloperName for RecordType of same sObject #3702

Closed aditya-balachander closed 11 months ago

aditya-balachander commented 1 year ago

W-11466074

Fixed a bug during upsert (load) of records where if the sObject had two record types with the same DeveloperName but different IsPersonType, duplicate records were being generated for load and as a result, error was thrown.

Example: For the sObject Account, the record type PersonAccounts has DeveloperName = PersonAccounts and IsPersonType = True. I could also create another recordType such that DeveloperName = PersonAccounts but the IsPersonType = False. In such cases, say I was trying to upsert 1 record (any update_key) with this PersonAccounts (one of the two), 2 records would try to get inserted and would throw a duplicate row error.