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
SalesforceDeveloper.ax1288SalesforceDeveloper.ax1288 

Urgent Convert lead to Opportunity only for a particular profile

Hi,

 

I want to convert a lead to opportunity only for sales profile and want the standard functionality for remaining profiles. Is there any way to accomplish this?

 

any help is greatly appreciated. Thanks in advance.

Best Answer chosen by Admin (Salesforce Developers) 
Mayank_JoshiMayank_Joshi

Hi ,

 

The STANDARD whole procedure for Lead conversion is to make lead into Account ,contact and opportunity (optional) . So, ideally it is not possible with SFDC standard fuctionality .

 

But ,using Apex we can create customized functionality  where you can convert Lead to opportunity and optionally with Account and Contact .Again ,you can utilize Apex Standard method i.e. Database.LeadConvert  

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_dml_convertLead.htm  

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_leadstatus.htm 

 

NOTE:   Database.LeadConvert   is only useful for Standard lead conversion I.e. Lead to Account, contact ,opportunity (optional) . 

 

You need to create a separate trigger on lead to convert it to only Opportunity and a custom button on Lead detail page that should invoke trigger .

 

Regards,