PLEASE SUBSCRIBE IF YOU LIKE THE VIDEO Link of the above video : trailhead.salesforce.com/en/c... link of the module : trailhead.salesforce.com/cont...
3.1 LeadProcessor ******************* public class LeadProcessor implements Database.Batchable {
public Database.QueryLocator start(Database.BatchableContext bc) { // collect the batches of records or objects to be passed to execute return Database.getQueryLocator([Select LeadSource From Lead ]); } public void execute(Database.BatchableContext bc, List leads){ // process each batch of records for (Lead Lead : leads) { lead.LeadSource = 'Dreamforce'; } update leads; } public void finish(Database.BatchableContext bc){ } } 3.2 LeadProcessorTest ************************** @isTest public class LeadProcessorTest {
@testSetup static void setup() { List leads = new List(); for(Integer counter=0 ;counter
The Apex class doesn't use a QueryLocator in the start method. Make sure you use a QueryLocator in the start method to collect all Lead records in the org.
The 'LeadProcessor' class did not achieve 100% code coverage via your test methods. Make sure that you chose 'Run All' tests in the Developer Console at least once before attempting to verify this challenge.
Guys who are facing “class did not achieve 100% test coverage” error, please check for any Flows if active on Lead object. Deactivate them and the class achieves 100% test coverage.
Those who are getting 100% code coverage error. Go in validation rules and inactivate the validation rule in Lead Object with error message 'Business can be done with US Leads only'. It will be successful then :)
The 'LeadProcessor' class did not achieve 100% code coverage via your test methods. Make sure that you chose 'Run All' tests in the Developer Console at least once before attempting to verify this challenge. ila vasthundhi bro
The apex class doesn't use a query locator in the start method .make sure you use a QueryLocator in the start method to collect all lead records in the org. Enti bro edhi em cheyali
The 'LeadProcessor' class did not achieve 100% code coverage via your test methods. Make sure that you chose 'Run All' tests in the Developer Console at least once before attempting to verify this challenge.
The 'LeadProcessor' class did not achieve 100% code coverage via your test methods. Make sure that you chose 'Run All' tests in the Developer Console at least once before attempting to verify this challenge.
The 'LeadProcessor' class did not achieve 100% code coverage via your test methods. Make sure that you chose 'Run All' tests in the Developer Console at least once before attempting to verify this challenge.
3.1 LeadProcessor
*******************
public class LeadProcessor implements Database.Batchable {
public Database.QueryLocator start(Database.BatchableContext bc) {
// collect the batches of records or objects to be passed to execute
return Database.getQueryLocator([Select LeadSource From Lead ]);
}
public void execute(Database.BatchableContext bc, List leads){
// process each batch of records
for (Lead Lead : leads) {
lead.LeadSource = 'Dreamforce';
}
update leads;
}
public void finish(Database.BatchableContext bc){
}
}
3.2 LeadProcessorTest
**************************
@isTest
public class LeadProcessorTest {
@testSetup
static void setup() {
List leads = new List();
for(Integer counter=0 ;counter
LeadProcessor class lo 100% code coverage avvaledu bro😢
Help me with this
@@kushalpatlegar.78 bro leadproccessor class 100% code coverage vachindha niku?
@@y.madhukiran1228 ha bro vachindi...
Ela vachindho cheppu bro
in test class i got error Method does not exist or incorrect signature: void executeBatch(LeadProcessor) from the type Database
Spin up a new playground and try again if your LeadProcessor code coverage is 0%. I tried this and it worked. Thanks again!
Hii I need your help for LeadProcessor
@@bhabanipanigrahi767 nvm
After running the program the overall code coverage not showing percentage as 100% could you please tell what I have done mistake
i like your videos bro, no time wasting.. straight to the point
did you know < >no explanation *#$%@
The Apex class doesn't use a QueryLocator in the start method. Make sure you use a QueryLocator in the start method to collect all Lead records in the org.
was this solved already? I'm having the same problems
How
Solution for 100 percent lead processir is save these 2 files multiple time and all multiple times and check for points repeatedly
It really worked thank you 😊
cloud you tell me how to get leadprocessor 100%
The 'LeadProcessor' class did not achieve 100% code coverage via your test methods. Make sure that you chose 'Run All' tests in the Developer Console at least once before attempting to verify this challenge.
leadProcessor is a legal name ani vostundi broh
The 'LeadProcessorTest' test class doesn't use the 'LeadProcessor' class.
showing this error how i can clear this error
leadprocessortest code ni correct ga copy cheyee bro
EVAREVARIKITEY ERROR VASTUNDO VALLU SAVE CHESI RUN ALL KOTTANDI
Guys who are facing “class did not achieve 100% test coverage” error, please check for any Flows if active on Lead object. Deactivate them and the class achieves 100% test coverage.
Class leadprocessor must implement thr method:void database.batchablr.finish(database.batchablecontext) ani vasthundhi bro how to correct it
could you solve the error?
Those who are getting 100% code coverage error. Go in validation rules and inactivate the validation rule in Lead Object with error message 'Business can be done with US Leads only'. It will be successful then :)
This helped ..Thank you
Where are validation rules
Errors em levu sir kani duplicate value found ani vastundhi em cheyali cheppadhi sir
Ante meeru already aa name tho file create chesaru
So meeru open resource lo ki velli me file name type chesi open chesi andhulo cheyyandi
The 'LeadProcessor' class did not achieve 100% code coverage via your test methods. Make sure that you chose 'Run All' tests in the Developer Console at least once before attempting to verify this challenge.
ila vasthundhi bro
bro did u solved it, help me bro
Bro same phom
Any solution?
Solved!!
@@dash0410 the tell us bro
@wonderstudies why it is showing like insert failed
Same prblm bro
Any solution?
How to fix it?
@@kaeungh create new playground, and try . 100% it's work.
@@allu___shasha2530 thanks, it worked👍
bro insert failed coming
Solved!!!
Failed to enqueue tests.: An unknown exception occurred when running the programme so pls remove from this error sir
illegal name ani vastundhi lead processor
Starting space clear cheyu
Tq soo much bro
Bro leadprocessor is not a legal name
The apex class doesn't use a query locator in the start method .make sure you use a QueryLocator in the start method to collect all lead records in the org. Enti bro edhi em cheyali
i didn't get ur point
@@sruthisetty3981 alane vasthundi error
Same here also
Ela chesaru cheppandi....PlZ ...🙏
didyou got your solution ?
thank you bro
You are welcome
You are welcome
@@WonderStudies Status: Insert Failed ani vastondi bro 😢
@@WonderStudies 100% code coverage avvaledu bro.. Help me
@@kushalpatlegar.78 same problem bro
The 'LeadProcessor' class did not achieve 100% code coverage via your test methods. Make sure that you chose 'Run All' tests in the Developer Console at least once before attempting to verify this challenge.
any solution?
@@amitsoni9984 I Have
@@dash0410 tell plz
The 'LeadProcessor' class did not achieve 100% code coverage via your test methods. Make sure that you chose 'Run All' tests in the Developer Console at least once before attempting to verify this challenge.
Same problem
Any solution?
Playground change cheyandi
@@chejerlatarun3528 elagaa change cheyali playground
@@chejerlatarun3528 bro change chesi chesina same problem bro avvataledu
The 'LeadProcessor' class did not achieve 100% code coverage via your test methods. Make sure that you chose 'Run All' tests in the Developer Console at least once before attempting to verify this challenge.
same problemmm broo
Did it worked?
Same problem could you please tell me how to get it successfully
Solved!!!
@@dash0410 how?