Apex Triggers - 2 (Trigger Context Variables with Scenario)

Поділитися
Вставка
  • Опубліковано 17 жов 2024

КОМЕНТАРІ • 20

  • @HelloitsmeReena
    @HelloitsmeReena 21 годину тому

    Thank you so much Sir, i have been having a hard time understanding triggers and now i understand why i write each line it is very useful. there are many youtube channels when scenarios gets tougher then they don't explain why they wrote certain lines and for beginners its really stressful. thank you for the effort you have put in Sir. Thank you.

  • @dharmeshtayade4856
    @dharmeshtayade4856 3 дні тому +1

    you explain very well but why did you not create a separate class for that trigger?

  • @Royi8083
    @Royi8083 11 місяців тому +1

    Thank you bro, I've been struggling with Apex and triggers before watching your videos

  • @stefan4926
    @stefan4926 6 місяців тому +1

    Videos are on point! Keep doing the good work!!❤

    • @sfdcninjas
      @sfdcninjas  5 місяців тому

      Thank you so much 😁

  • @shubhamshriwash6111
    @shubhamshriwash6111 6 місяців тому

    if we only have isbefore in our trigger , then i dont think we need to check for "if(!trigger.new.isempty())" ,please correct me if iam wrong..?

  • @sankuramana6421
    @sankuramana6421 6 місяців тому

    Super neat and clean

  • @natarajans1961
    @natarajans1961 2 місяці тому

    Hi bro, I have seen plenty of videos regarding trigger, but you nailed it bro, really thanks for your teaching bro.

  • @rajeshprogram2488
    @rajeshprogram2488 2 місяці тому

    Hi just wanted to know do u need null check

  • @ravigrover1923
    @ravigrover1923 4 місяці тому

    Hi Badal,
    Is this logic also same or different because its working same as your use case
    ------
    trigger AccountTrigger on Account (before insert) {
    if (trigger.isBefore && trigger.isInsert){
    // copy Billing address fields to mailing address fields
    if (!trigger.new.isEmpty()){
    for (Account acc : Trigger.new) {
    if (acc.BillingStreet != null || acc.BillingCity != null || acc.BillingState != null || acc.BillingPostalCode != null || acc.BillingCountry != null){
    acc.ShippingStreet = acc.BillingStreet;
    acc.ShippingCity = acc.BillingCity;
    acc.ShippingState = acc.BillingState;
    acc.ShippingPostalCode = acc.BillingPostalCode;
    acc.ShippingCountry = acc.BillingCountry;
    }
    }
    }
    }
    }
    ------

  • @harshtyagi5806
    @harshtyagi5806 Рік тому +1

    Well explanation with scenarios

  • @prabhavgoel3309
    @prabhavgoel3309 Рік тому

    Very well explained keep it up brother 👍

  • @himanshudamani2998
    @himanshudamani2998 Рік тому

    Great explanation 👍

  • @akshultyagii
    @akshultyagii Рік тому

    Well Explained 👍

  • @srisadgurusairam1688
    @srisadgurusairam1688 2 місяці тому

    pls upload the codes