Q:

How to Convert a Contact back to lead - and delete the old contact and account

I need the option to convert contacts back to leads, and delete the old contact and account.
Suggested links work only half way - meaning: they create the new lead.
http://boards.developerforce.com/t5/Product-Discussion/Converting-a-Contact-to-a-Lead/td-p/55025
I am using the following link, to create the lead: 

https://emea.salesforce.com/00Q/e?name_salutationlea2={!Contact.Salutation}&name_lastlea2={!Contact.LastName}&name_firstlea2={!Contact.FirstName}&lea8={!Contact.Phone}&lea3={!Account.Name}&lea11={!Contact.Email}&lea4={!Contact.Title}&lea16street={!Contact.MailingAddress}&lea16city={!Contact.MailingCity}&lea16state={!Contact.MailingState}&lea16country={!Contact.MailingCountry}&lea16zip={!Contact.MailingPostalCode}&lea9={!Contact.MobilePhone}&lea10={!Contact.Fax}&lea12={!Account.Website}

However, I need to be able and Delete the old Account and Contact.
Any ideas?

A:

What I did was:

Create a custom field on lead: From_Account__c
I updated the custom link, to populate the From_Account__c with the Account value from that Contact: 
{!$Site.CurrentSiteUrl}/00Q/e?name_salutationlea2={!Contact.Salutation}&name_lastlea2={!Contact.LastName}&name_firstlea2={!Contact.FirstName}&lea8={!Contact.Phone}&lea3={!Account.Name}&lea11={!Contact.Email}&lea4={!Contact.Title}&lea16street={!Contact.MailingAddress}&lea16city={!Contact.MailingCity}&lea16state={!Contact.MailingState}&lea16country={!Contact.MailingCountry}&lea16zip={!Contact.MailingPostalCode}&lea9={!Contact.MobilePhone}&lea10={!Contact.Fax}&lea12={!Account.Website}&00N4444440dXsY={!Account.Id}
I created an (after insert) trigger, that will delete the account, based on the ID from  field: SFSE Q

trigger deleteAccountFromContact on Lead (after insert) {
if (Trigger.new[0].From_Account__c != null)
{

    List<Account> accountsToDelete = new List<Account>();

    Account tempAccount = [Select Id from Account where Id =:Trigger.new[0].From_Account__c];

    accountsToDelete.add( tempAccount ) ;

    delete accountsToDelete;
}

And Voila: we have a "Convert to Lead" from Contact object, that deletes the account and the associated contacts (use with caution!)

