How to customize lead conversion popup page and the convert button in that popup page in lightning component. I need code snippets as I am new in this lightning part.
HI Aditi, Recommend you to review https://salesforce.stackexchange.com/questions/299119/standard-lead-convert-action-on-custom-lightning-component https://rajvakati.com/2018/10/01/multiple-leads-conversion-with-lightning-component/
The conversion is to be done through an apex class : Sample code snippet
public static Database.LeadConvertResult convertLead(Lead candidato, Boolean noCrearOpp){
Database.LeadConvert leadConvert = new database.LeadConvert();
leadConvert.setLeadId(candidato.id);
leadConvert.setDoNotCreateOpportunity(noCrearOpp);
LeadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted = true LIMIT 1];
leadConvert.setConvertedStatus(convertStatus.MasterLabel);
Database.LeadConvertResult leadConvertResult = Database.convertLead(leadConvert);
return leadConvertResult;
}
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful.Thank you
Recommend you to review
https://salesforce.stackexchange.com/questions/299119/standard-lead-convert-action-on-custom-lightning-component
https://rajvakati.com/2018/10/01/multiple-leads-conversion-with-lightning-component/
The conversion is to be done through an apex class :
Sample code snippet
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful.Thank you
But can I get JS code and component part for popup page of the convert button, and how to invoke the apex class using JS .