apex trigger interview questions scenario based || Part 2

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 พ.ค. 2024
  • In this video i am sharing :
    apex trigger interview questions scenario based
    salesforce coding interview questions
    apex trigger scenarios
    Want to Connect with me one to one :
    topmate.io/salesforce_in_5_minutes

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

  • @tarseelkazmi6682
    @tarseelkazmi6682 หลายเดือนก่อน +1

    Great explanation. Can you please explain the difference between put and add method as I am very much confused when to use which.

    • @salesforcein5minutes
      @salesforcein5minutes  หลายเดือนก่อน +1

      Thanks a lot 😃
      1) When you are using maps thats when you use put
      For example
      map mymap = new Map() ;
      mymap.put('A', ' subscribe ') ;
      2) when you are using lists / sets we use add function instead
      List mylist = new List () ;
      mylist.add('sf in 5 minutes') ;

  • @teluguraju981
    @teluguraju981 หลายเดือนก่อน +1

    Excellent 👌, after completed the code please test and show the result the functionality in Salesforce UI

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

      Thanks,
      It works i have tried it, note pad shows the whole view hence i coded there

  • @Arunaish-99
    @Arunaish-99 21 วันที่ผ่านมา +1

    Hii Bro!! Next time can you write the handler class while writting the triggers

  • @tarseelkazmi6682
    @tarseelkazmi6682 หลายเดือนก่อน +1

    Here.

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

      Thats scenario where one parent having 2 childs and if one of child is updated, update the another child of same parent

    • @salesforcein5minutes
      @salesforcein5minutes  หลายเดือนก่อน +1

      Again thanks a lot man i have reuploaded the video for part 3 🙏🙏 sorry for not reviewing properly

  • @GAI1408
    @GAI1408 14 วันที่ผ่านมา

    Hi I am struggling to understand this Logic because how it will prevent automatically to unchecked other contacts
    Can you please write a explanation of this code in chat I am little confused

  • @namanshetty2781
    @namanshetty2781 หลายเดือนก่อน +1

    Suppose we have 10 contacts associated to an account and there's 2 contacts that are active. Now if i try to update 5 contacts that are inactive to activate, then all these 5 contacts will be active and the 2 existing contacts which were active will be inactive. But the requirement is only to have 1 active contact for an account. How can we do this sir?

    • @salesforcein5minutes
      @salesforcein5minutes  หลายเดือนก่อน +1

      You have to further write a before trigger to validate that any account must only have one related contact as active, if some one tries to make multiple active then throw error

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

      @@salesforcein5minutes makes sense thanks