ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก

Use Batch Apex || Asynchronous Apex || Salesforce

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 มิ.ย. 2022
  • 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...

ความคิดเห็น • 100

  • @WonderStudies
    @WonderStudies  2 ปีที่แล้ว +69

    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

    • @kushalpatlegar.78
      @kushalpatlegar.78 ปีที่แล้ว +5

      LeadProcessor class lo 100% code coverage avvaledu bro😢

    • @kushalpatlegar.78
      @kushalpatlegar.78 ปีที่แล้ว +1

      Help me with this

    • @y.madhukiran1228
      @y.madhukiran1228 ปีที่แล้ว

      @@kushalpatlegar.78 bro leadproccessor class 100% code coverage vachindha niku?

    • @kushalpatlegar.78
      @kushalpatlegar.78 ปีที่แล้ว

      @@y.madhukiran1228 ha bro vachindi...

    • @y.madhukiran1228
      @y.madhukiran1228 ปีที่แล้ว

      Ela vachindho cheppu bro

  • @bpr2885
    @bpr2885 ปีที่แล้ว +6

    in test class i got error Method does not exist or incorrect signature: void executeBatch(LeadProcessor) from the type Database

  • @abhishaekchandra1352
    @abhishaekchandra1352 ปีที่แล้ว +4

    Spin up a new playground and try again if your LeadProcessor code coverage is 0%. I tried this and it worked. Thanks again!

    • @bhabanipanigrahi767
      @bhabanipanigrahi767 ปีที่แล้ว

      Hii I need your help for LeadProcessor

    • @mahesh_bvn
      @mahesh_bvn 15 วันที่ผ่านมา

      @@bhabanipanigrahi767 nvm

  • @shahul2489
    @shahul2489 ปีที่แล้ว +3

    After running the program the overall code coverage not showing percentage as 100% could you please tell what I have done mistake

  • @Rurouni_Jayanth
    @Rurouni_Jayanth ปีที่แล้ว +5

    i like your videos bro, no time wasting.. straight to the point

    • @Hellohgf
      @Hellohgf ปีที่แล้ว

      did you know < >no explanation *#$%@

  • @pr4kh4r
    @pr4kh4r ปีที่แล้ว +3

    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.

  • @vatsalsharma08
    @vatsalsharma08 8 หลายเดือนก่อน +3

    Solution for 100 percent lead processir is save these 2 files multiple time and all multiple times and check for points repeatedly

  • @albatross9278
    @albatross9278 ปีที่แล้ว +3

    It really worked thank you 😊

    • @rockstarraju9932
      @rockstarraju9932 ปีที่แล้ว

      cloud you tell me how to get leadprocessor 100%

  • @shankar5807
    @shankar5807 ปีที่แล้ว +2

    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.

  • @sivatdpian1982
    @sivatdpian1982 ปีที่แล้ว +2

    leadProcessor is a legal name ani vostundi broh

  • @durganageshganisetti909
    @durganageshganisetti909 ปีที่แล้ว +13

    The 'LeadProcessorTest' test class doesn't use the 'LeadProcessor' class.
    showing this error how i can clear this error

    • @v.k.v.msantosh8793
      @v.k.v.msantosh8793 ปีที่แล้ว

      leadprocessortest code ni correct ga copy cheyee bro

  • @dbsrohan708
    @dbsrohan708 6 หลายเดือนก่อน

    EVAREVARIKITEY ERROR VASTUNDO VALLU SAVE CHESI RUN ALL KOTTANDI

  • @sarthakmokashi6271
    @sarthakmokashi6271 3 หลายเดือนก่อน

    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.

  • @chetana4173
    @chetana4173 6 หลายเดือนก่อน

    Class leadprocessor must implement thr method:void database.batchablr.finish(database.batchablecontext) ani vasthundhi bro how to correct it

  • @deepakgidwani9003
    @deepakgidwani9003 ปีที่แล้ว +1

    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 :)

    • @syedtasneem4173
      @syedtasneem4173 10 หลายเดือนก่อน

      This helped ..Thank you

    • @gattusaiteja9679
      @gattusaiteja9679 6 หลายเดือนก่อน

      Where are validation rules

  • @navyasre4831
    @navyasre4831 ปีที่แล้ว +1

    Errors em levu sir kani duplicate value found ani vastundhi em cheyali cheppadhi sir

    • @molletiprasanthi7132
      @molletiprasanthi7132 ปีที่แล้ว

      Ante meeru already aa name tho file create chesaru

    • @molletiprasanthi7132
      @molletiprasanthi7132 ปีที่แล้ว

      So meeru open resource lo ki velli me file name type chesi open chesi andhulo cheyyandi

  • @s.rajeshsr3817
    @s.rajeshsr3817 ปีที่แล้ว +7

    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

  • @tippanajothsnaanjinisaiman6362
    @tippanajothsnaanjinisaiman6362 ปีที่แล้ว

    @wonderstudies why it is showing like insert failed

    • @allu___shasha2530
      @allu___shasha2530 ปีที่แล้ว

      Same prblm bro

    • @allu___shasha2530
      @allu___shasha2530 ปีที่แล้ว

      Any solution?

    • @kaeungh
      @kaeungh ปีที่แล้ว

      How to fix it?

    • @allu___shasha2530
      @allu___shasha2530 ปีที่แล้ว

      @@kaeungh create new playground, and try . 100% it's work.

    • @kaeungh
      @kaeungh ปีที่แล้ว +1

      @@allu___shasha2530 thanks, it worked👍

  • @BorraSairam
    @BorraSairam ปีที่แล้ว +2

    bro insert failed coming

    • @dash0410
      @dash0410 ปีที่แล้ว

      Solved!!!

  • @machupallianilkumar8105
    @machupallianilkumar8105 ปีที่แล้ว

    Failed to enqueue tests.: An unknown exception occurred when running the programme so pls remove from this error sir

  • @i-ls-14-sreyagayathrirapet29
    @i-ls-14-sreyagayathrirapet29 ปีที่แล้ว +1

    illegal name ani vastundhi lead processor

  • @GaneshGani-zm2kw
    @GaneshGani-zm2kw 6 หลายเดือนก่อน

    Bro leadprocessor is not a legal name

  • @snehaabhi2473
    @snehaabhi2473 ปีที่แล้ว +2

    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

    • @sruthisetty3981
      @sruthisetty3981 ปีที่แล้ว

      i didn't get ur point

    • @snehaabhi2473
      @snehaabhi2473 ปีที่แล้ว

      @@sruthisetty3981 alane vasthundi error

    • @abdevil176
      @abdevil176 ปีที่แล้ว

      Same here also

    • @routhusuvarna8353
      @routhusuvarna8353 ปีที่แล้ว

      Ela chesaru cheppandi....PlZ ...🙏

    • @pr4kh4r
      @pr4kh4r ปีที่แล้ว

      didyou got your solution ?

  • @seerabhaskarrao1089
    @seerabhaskarrao1089 2 ปีที่แล้ว

    thank you bro

    • @WonderStudies
      @WonderStudies  2 ปีที่แล้ว

      You are welcome

    • @WonderStudies
      @WonderStudies  2 ปีที่แล้ว

      You are welcome

    • @kushalpatlegar.78
      @kushalpatlegar.78 ปีที่แล้ว

      @@WonderStudies Status: Insert Failed ani vastondi bro 😢

    • @kushalpatlegar.78
      @kushalpatlegar.78 ปีที่แล้ว +1

      @@WonderStudies 100% code coverage avvaledu bro.. Help me

    • @Vampire1-o2q
      @Vampire1-o2q ปีที่แล้ว

      @@kushalpatlegar.78 same problem bro

  • @prabhatkumarsingh3180
    @prabhatkumarsingh3180 ปีที่แล้ว +5

    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.

    • @amitsoni9984
      @amitsoni9984 ปีที่แล้ว

      any solution?

    • @dash0410
      @dash0410 ปีที่แล้ว +1

      @@amitsoni9984 I Have

    • @omgolhani491
      @omgolhani491 ปีที่แล้ว

      @@dash0410 tell plz

  • @pallavirayapureddi3844
    @pallavirayapureddi3844 ปีที่แล้ว +4

    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.

  • @pallavirayapureddi3844
    @pallavirayapureddi3844 ปีที่แล้ว +8

    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.