0

Our org uses person accounts and I'm trying to change the record types of a bunch of account records to be person accounts from organizations.

However, I can't find a way of successfully changing the record types all at once. I've tried the download/upload approach in the data loader as well as the code below. Both give error messages...

id persType = '012d0000000OQJ0AAO';
list <account> impacted = [select Id, Name, ownerid, RecordTypeId, IsPersonAccount from account 
                          where IsPersonAccount = false];
for (account r : impacted) {
    r.RecordTypeid = persType;
}
upsert impacted;

If you've done this successfully in the past, please share your tricks...

Thanks,

Steve

0

you cannot change a person account record type to one designated for business accounts. You can change an account's record type only to another record type of the same kind. Reference

| improve this answer | |
0

See How to convert a standard Account and Contact to a Person Account?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.