It seems like you want to convert a new Contact that is being inserted into a Person Account.
Have a look at the Convert existing account-contact pairs to person accounts steps in the Implementing Person Accounts documentation.
Convert existing account-contact pairs to person accounts
- Create one-to-one relationships between account and contact records. In other words, remove all contacts on the accounts
except for the contact that will be converted with the account.
- Identify the accounts that have a different owner than the associated contact. Change the ownership of either record so both
are owned by the same user.
- If your organization uses multiple currencies, identify the accounts that have a different currency than the associated contact.
Change the currency of either record so both have the same currency.
- Make sure the
Parent Account field is blank on all accounts that will be converted. Also, make sure none of the accounts
are the parent account of another account.
- Make sure the
Reports To field is blank on all contacts that will be converted. Also, make sure none of the contacts are in
Reports To field of another contact.
Implementing Person Accounts Recommended Implementation Procedures
- As much as reasonably possible, edit the accounts so they contain all desired field values.
- Using the SOAP API, update the record types of the chosen accounts to convert them to the desired person account record type.
We recommend running a test conversion in your sandbox.
Now your steps will be a bit different. You will need to insert the Account and then link the Contact to it using the AccountId field. Then after the account has been inserted and the Contact linked to it you can change the accounts record type to indicate it is a Person Account.
Coming back to your trigger. I believe this will need to be an after update trigger so that the Contact can be inserted and then referenced back to the newly created Account. Then you can change the Accounts record Type.