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
Vijaya Lakshmi 134Vijaya Lakshmi 134 

Create a custom convert button in contact and once the contact is converted to lead delete that contact from contact object

Khan AnasKhan Anas (Salesforce Developers) 
Hi Vijaya,

I trust you are doing very well.

According to Salesforce help article (https://help.salesforce.com/articleView?id=faq_leads_can_i_convert.htm&type=5): You cannot convert existing accounts or contacts into leads. As an alternative, create an opportunity for the account or contact. If you prefer to use a lead, create a report containing the accounts or contacts you want to convert into leads, export them, and then import them as leads.

It is an idea to provide this functionality: 
https://success.salesforce.com/ideaView?id=08730000000BqfTAAS
https://success.salesforce.com/ideaView?id=08730000000BpOuAAK

But as a workaround you can follow below steps:

1. Go to setup
2.Click Customize from left side panel
3.Click contact drop down
4.Click Buttons, Links & Actions
5.Click new button or link
6. Name Label (eg. Clone/convert to lead)
7. Enter a description (eg. Clone contact details into new lead form)
8. Paste in link below into syntax box (change instance to your org instance):
https://na1.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}
9. Check syntax
10. Click Save
11. Go to contacts tab and select a contact (to see it in action)
12. Click Edit Layout - Top right hand screen
13. Add your link/button in the custom links section
14.Review your lead form and save

Please refer to the below link with a similar discussion which might help you further with the above requirement (to delete a contact after converting it to lead).

https://salesforce.stackexchange.com/questions/10811/how-to-convert-a-contact-back-to-lead-and-delete-the-old-contact-and-account

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks and Regards,
Khan Anas
Lakshmi Kalyan KoduriLakshmi Kalyan Koduri
Hi Anas,
               Iam unable to find link/button in contacts. Any help

Thanks & Regards,
Vijaya.
Vijaya Lakshmi 134Vijaya Lakshmi 134
Hi Khan Anas,

                            Link or button is not visible in contacts.

Thanks and Regards,
Vijaya Lakshmi.

 
Khan AnasKhan Anas (Salesforce Developers) 
Hi Vijaya,

Please refer to below screenshots:

User-added image


User-added image


Regards,
Khan Anas
Lakshmi Kalyan KoduriLakshmi Kalyan Koduri
Hi Anas,

                   Thank you, contact is converting to lead. But here i want to delete the contact after converting to lead in contact object which iam unable to achieve. Any help please.

Thanks & Regards,
Vijaya.
Khan AnasKhan Anas (Salesforce Developers) 
Hi,

Follow below steps:

1. Create a custom field on the Lead object (Type: TEXT) with API Name From_Contact__c
2. Copy the Id of this field from URL:

User-added image

3. Update custom link syntax as (replace custom field Id on last line):
https://khananasrehmani-dev-ed.my.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}&00N7F00000RJEAk={!Contact.Id}

Note: Replace 00N7F00000RJEAk with your field Id

4. Write a trigger on the Lead object:
 
trigger DeleteConAfterLeadConvert on Lead (after insert) {
    
    if (Trigger.new[0].From_Contact__c != null) {        
        List<Contact> contactsToDelete = new List<Contact>();        
        Contact tempContact = [Select Id from Contact where Id =:Trigger.new[0].From_Contact__c];        
        contactsToDelete.add( tempContact ) ;        
        DELETE contactsToDelete;
    }
}

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks and Regards,
Khan Anas