You need to sign in to do that
Don't have an account?

How Do I Make The Opportunity Name Field Mandatory When Converting A Lead
When I convert a lead in lightning experience I need to force a user to create an Opportunity. Is there any validation that will allow me to do this?
Just post the below code and trigger will gain 100%code coverage
All Answers
I would recommend to write a Apex Trigger on Lead.
Try This:
Best Regards,
Sourav
I needed to refresh the sandbox so as soon as this has been completed I will test this.
I've tried this on my dev org and it works fine. Can you help me with the Class so that I can migrate it to the Production Org?
Are yo talking about Trigger handler class?
Thanks
Regards
Paarth Jolly
Yes, I'm guessing it's a Trigger Handler. I need a class for the above trigger so that I can deploy it into the production org.
Please check handler class .I hope it helps you out .And thanks to dutta for trigger .
handler class
Best Regards,
Paarth Jolly
I'm getting the following error message:
Error: Compile Error: Variable does not exist: leadList at line 5 column 26
I am soorry just replace leadlist by newleadList in line 5
I'm getting the below error message when I try to deploy. I don't understand why as the trigger shows 100% coverage.
Code Coverage Failure
Your organization's code coverage is 74%. You need at least 75% coverage to complete this deployment. Also, the following triggers have 0% code coverage. Each trigger must have at least 1% code coverage.
PreventLeadConvertNoOppTrigger
For that you need to write a test class for the trigger .
Does the handler class got any code coverage .
Thanks
Test class - its a class which is used for coverage of the code written in trigger or apex classes .
Are you able to help me with the Test Class?
Just post the below code and trigger will gain 100%code coverage