You need to sign in to do that
Don't have an account?
PRADEEP YADAV 5
Lead Converted Automatically
whenever lead get saved with web then automatically convert it
trigger LeadConvert on Lead(after Insert, after Update)
{
List<String>LeadName = new List<String>();
for(Lead myLead : trigger.new)
{
if(myLead.isconverted ==false && myLead.LeadSource == 'web')
{
Database.LeadConvert lc = new Database.LeadConvert();
lc.setLeadId(myLead.Id);
lc.convertedStatus = 'Closing-Converted';
lc.setDoNotCreateOpportunity(true);
Database.LeadConvertResult lcr = Database.convertLead(lc);
System.assert(lcr.isSuccess());
}
}
}
try but lead not converted then how to converted automatically
trigger LeadConvert on Lead(after Insert, after Update)
{
List<String>LeadName = new List<String>();
for(Lead myLead : trigger.new)
{
if(myLead.isconverted ==false && myLead.LeadSource == 'web')
{
Database.LeadConvert lc = new Database.LeadConvert();
lc.setLeadId(myLead.Id);
lc.convertedStatus = 'Closing-Converted';
lc.setDoNotCreateOpportunity(true);
Database.LeadConvertResult lcr = Database.convertLead(lc);
System.assert(lcr.isSuccess());
}
}
}
try but lead not converted then how to converted automatically
Try the code as mentioned in the below blogs,
https://developer.salesforce.com/forums/?id=9060G000000XdnXQAS
https://developer.salesforce.com/forums/?id=906F0000000BYZ2IAO
https://developer.salesforce.com/forums/?id=9060G0000005O8jQAE
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks.
All Answers
Try the code as mentioned in the below blogs,
https://developer.salesforce.com/forums/?id=9060G000000XdnXQAS
https://developer.salesforce.com/forums/?id=906F0000000BYZ2IAO
https://developer.salesforce.com/forums/?id=9060G0000005O8jQAE
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks.
Please Abhishek Suggesting to me Which Type of Project Build in Developer Part
https://1000projects.org/projects/salesforce-projects
https://www.couponxoo.com/final-year-project-on-salesforce