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
NCEE_AndrewNCEE_Andrew 

Convert Person Account to Contact

Our organization would like to convert all Person Accounts to Contacts. We would like the converted contact to be connect to an account named, "Generic Contact."  I looked into this a little and this is what I found out. 

 

Option 1:

Each Person Account has a record in both the Account table and Contact table.  The Contact table holds all the Person Acount information.  The Contact table has a field called IsPersonAccount which is marked true. I would like to change the IsPersonAccount to false, change the AccountId to that of the "Generic Contact" account and Delete the Account with the old AccountId.

 

Whenever I try to change the IsPersonAccount to false, I get an error "INVALID_FIELD_FOR_INSERT_UPDATE".

 

Option 2:

Now I can export the contacts to a csv file and  filter out all contacts with business accounts leaving the Person Accounts.  Then I can delete all Person Accounts and import the people in my csv file as contacts.  Finally, reconnect all compaigns using the PHP API.  

 

 

I would much rather change the AccountId and IsPersonAccount fields  (much less work).  Is there anyway to do option 1 or is there a better way of converting PersonAccounts to Contacts?

werewolfwerewolf
May I ask why you want to do this?  The whole point of person accounts is so that you don't have to attach all your contacts to a generic account.
NCEE_AndrewNCEE_Andrew
We would like to clean up the accounts so that only businesses reside there.  Also, we would like to be able to connect a business account to any customer that we have in SF, but I do not see a way to do this if the customer is registered as a person account.
werewolfwerewolf

We would like to clean up the accounts so that only businesses reside there.

 

Why not just set your list views and reports to point only to accounts that have a business account record type then?

 

Also, we would like to be able to connect a business account to any customer that we have in SF, but I do not see a way to do this if the customer is registered as a person account.

 

First of all, you could use the parent account field that's already there.  If that is otherwise in use, make a new custom lookup field that looks up to account, and show it only on the person account page layout.  This will allow you to connect your person accounts to business accounts.

 

Person accounts aren't perfect, but I come down squarely in favor of continuing to use them rather than hacking them into contacts.

NCEE_AndrewNCEE_Andrew

You're right.  Person accounts are not perfect.  Our organization is just starting with salesforce and I'd rather "hack" the few person accounts and have no work arounds.

 

Also, I don't want to create anymore custom fields then I have to. Any ideas about how to convert person accounts to contacts?

werewolfwerewolf

I still think what you're doing is a bad idea, and I don't understand your aversion to custom fields.

 

The Option 1 you specified above is exactly how person accounts work today -- they are already a joint Account-Contact object.  So it doesn't make a lot of sense for you to do that.

 

If you want to move them to straight Contacts then your option #2 is the way to go.

NCEE_AndrewNCEE_Andrew

I don't understand why converting person accounts to contacts is a bad idea.  I actually think it's a good idea because then contact information is all in the same spot instead of all over the place and I won't have to deal with any work arounds. 

 

Setting all personal opinions aside, is there anyway to convert Person Accounts or will I have to write some code to convert these customers?

Ron WildRon Wild

According to the documentation, you should be able to convert back and forth by changing the record type on the account.   You have to make sure there is a one-to-one relationship between the account and the contact before converting to a person account.  Going the other way, you end up with an account and a contact record, with the contact's account Id set to the resulting account record Id.

 

Unfortunately, this isn't as easy as it sounds.  I'm still mucking with the code to get a working example going.

 

Link: Person Accounts

Jeff TalbotJeff Talbot

Here's a bit from SF Help that might help you with the error you received:

 

If you change the record type of a business account to a person account using either update() or upsert(), you cannot make any other changes to fields in that account in the same call; if attempted, the fault INVALID_FIELD_FOR_INSERT_UPDATE will result.

NCEE_AndrewNCEE_Andrew

I successfull converted all Person Accounts to Contacts.  Here's how I did it:

 

  1. Created an Account called, "No Account"
  2. Exported all data from SF using the export tool
  3. Loaded that information into a MySQL database
  4. Used the PHP API to reload all person accounts into Salesforce with the Account name of "No Account"
  5. Deleted all Person Accounts

 

I know it's not the best way of going about it, but it worked for me.  In doing this, I created a Web-To-Contact form which keeps all contacts from being added into Safesforce as a person account. :)

Pablo EscobarPablo Escobar

Its much simpler than that. I have just converted a person account to a business account keeping all the info attached to the old person account to the contact.

 

 

  1. Run a report Account + Contact and Get Account and Contact IDs ( Do not use the URL that you have for the person account record as that ID belongs to the persona account and its kind of a new ID)
  2. Find a record type ID that you want to use for the new account - Go to Setup - Account - Record Type - Select one type and copy the ID from the URL.
  3. Find a record type ID that you want to use for the new contact - Same as above but with contact object
  4. Change Account record Type to the new account record type through the data loader. 
  5. Change Contact record Type to the new record type through the data loader. 

In case you have just 1 record type for Accounts or for contacts use the master record type IDs on step 4 and 5

 

 

 

rosiesfrosiesf

Pablo...thank-you so much for your post.  I pretty much followed your instructions with a few caveats that might help the next person break Person Records into both an Account and a Contact Record.  

 

First, we were using the Wealth Management overlay which uses Person Accounts by default, but unfortunately our Salesforce to Salesforce integration, amongst others, don't work with Person Accounts.  So we have had to revert back to Account and Contact Record Types.

 

  1. FIRST GET THE RECORD IDS FOR THE DIFFERENT RECORD TYPES
  2. Open up the ApexDataLoader
  3. Select the Export button
  4. Check Show all Salesforce objects
  5. Select Record Type (RecordType)
  6. Select the Select all fields button
  7. Go through the series of windows that popup, press View Extraction and then press Open in external program (which will spit everything out into Excel)
  8. THIS FILE WILL GIVE YOU THE RECORD TYPE IDS TO ALL POSSIBLE RECORDS--E.G. ACCOUNTS, CONTACTS, PERSON ACCOUNTS, ETC.
  9. Now open up Salesforce and generate a report of all of the Person Accounts you would like to convert
  10. You will need to drag and drop the following columns into the report: Account Record Type, Account ID, Contact Record Type and Contact ID
  11. Export this report in Excel
  12. NOW YOU ARE GOING TO HAVE TO MODIFY THIS REPORT YOU GENERATED IN SALESFORCE
  13. Using the first report you generated in steps 1-7, copy the Record ID listed for Accounts (012d0000000xxxxxxxx)  
  14. Paste this ID (012d0000000xxxxxxxx) in the Account Record Type column in the report you generated in Salesforce
  15. Copy and paste the Record ID for Contact and paste it in the Contact Record Type column in the report you generated in Salesforce
  16. Save the file
  17. Open up the ApexDataLoader
  18. Press the Update button
  19. Select Account (Account)
  20. Browse and open the Salesforce report you just modified
  21. When you get to Step 3: Mappings, select Create or Edit a Map
  22. Map Id to Account ID
  23. Map RecordTypeId to Account Record Type
  24. Press OK, go through the series of windows that popup until you have the word success popup somewhere and you are done!
  25. Now when you open up Salesforce, all of your Person Accounts will be broken out into both an Acocunt Record and a Contact Record
  26. Bonus: All of your task, event, case, attachment associations are still associated with the proper Account and/or Contact!



SmartPlayerSmartPlayer

Pablo...thank-you so much for your post. You saved me my friend..Nothing can be easier than this...Thanks once again.

SmartPlayerSmartPlayer

Process to convert a Person Account into a Contact and Business Account

 

  1. Extract all Person Contacts using the following query in Apex Data Loader

 

Select Id, AccountId, IsPersonAccount, LastName, FirstName, Name, RecordTypeId FROM Contact WHERE IsPersonAccount = true

 

  1. Take all the Person Accounts
  2. Update the Person Account Record Type with the required Business Account Record Type
  3. Take all Person Contacts
  4. If required, Update the Contact Record Type
  5. If required, Update the Contact Account

 Result of the Step 3 of Above Process –

  1. Person Account Record Type will be Changed
  2. Person Account will be turned into a Business Account
  3. The newly provided business account record type will be tagged with the above business account
  4. Also the Attached Person Contact will be separated from the Person Account and will turn into a Contact Record
  5. By default, the separated Contact record will automatically be tagged with the newly formed Business Account  (which was a Old Person Account)
  6. No Contact record type will be assigned to this Contact Record

Result of the Step 5 of Above Process –

  1. The contact record type will be changed with the NEW Contact Record Type

Result of the Step 6 of Above Process –

  1. Given Account will set as a Business Account of the Contact Record

 

PaulFischerSaaSPaulFischerSaaS

Hi all, thanks for the helpful information! 

 

I am receiving the following error when trying following the instructions:

 

ERROR: insufficient access rights on object id

 

I receive this error when I try to update the Account. The field mappings are Account ID to ID and Account Record Type to Record Type ID. The ID I am using is from the report and is only 15 characters. 

 

Does anyone know, why I might be receiving this error? 

@altius_rup@altius_rup
Is the Record Typeassigned to your profile ?
Ankit Garg 117Ankit Garg 117
Hi rosiesf,

I was able to this. On conversion, it creates a business account + a contact. Is there a way I can only hace contcat created and not a business account?

Thanks,