Rollup Summary Trigger for Lookup Relationship

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ต.ค. 2019
  • Want to learn more about salesforce join me at sfdcpanther.com Hi Everyone,
    In this video, we will discuss how to work with apex trigger and logic building.
    Below is the Agenda for the video
    1 - Problem Statement
    2 - Possible Solution
    3 - Choosing the right solution
    4 - Solution Approach
    5 - Develop the Apex Trigger
    6 - Assignment - Create a Custom Field on Contact (Amount) and another Custom Field on Account(Sum of Contact Amount). Develop a trigger to Sum the Amount on Account object using any Approach.
    Link to Code: - gist.github.com/amitastreait/...
    Link to PPT:- www.slideshare.net/amitsingh6...
    ContactMe -
    LinkedIn
    / simplyamit
    FaceBook
    / sfdcpanther
    Twitter
    / cloudyamit
    Instagram
    t.me/sfdcpanther
    Blog
    sfdcpanther.com
    Email
    sfdcpanther@gmail.com
    Previous Video
    Duplicate Contact Trigger - • Duplicate Contact Trig...
    Collection in Salesforce - • Introduction to Set & ...
    SOQL in Salesforce - • SOQL in Salesforce || ...
    OAuth 2.0 :- • An Overview to OAuth 2...
    #SalesforceForBeginner #Salesforce #ApexTrigger
    #JourneyToSalesforce

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

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

    Hi Amit great video. But solution 3 will fail in case of update

  • @HumanUniverse9
    @HumanUniverse9 4 ปีที่แล้ว

    Nice Video...Hope..U will be uploading more on lightning components example s

    • @sfdcpanther
      @sfdcpanther  4 ปีที่แล้ว

      Hi Mounika,
      There are already the complete list of lightning component videos available

  • @allaboutbreastcancer2017
    @allaboutbreastcancer2017 4 ปีที่แล้ว

    awesome amit sir :)

  • @venky-5417
    @venky-5417 4 ปีที่แล้ว

    Hi amit do a one video on trigger handler class it's helpfull for all

    • @sfdcpanther
      @sfdcpanther  4 ปีที่แล้ว

      Hi,
      Thanks for the suggestion, those kinda video are in pipeline.

  • @SandeepRahoolPV
    @SandeepRahoolPV 4 ปีที่แล้ว

    Hi Amit How are you doing, I hope you nice.
    Thanks allot for these videos, these are really nice for Apex learners with well explained, could you please make "@isTest" class on this trigger, I did it but getting only 56% code coverage, please do needful.

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

    I think we should use after delete trigger event also since after record deletion count should change

  • @JAYESHSHEWALE
    @JAYESHSHEWALE 4 ปีที่แล้ว

    Hi Amit,
    Can you please share the scenarios for practice of trigger...

    • @sfdcpanther
      @sfdcpanther  4 ปีที่แล้ว

      Hi Jayesh, You will get the list very soon. Please be patient compiling the scenarios take time.

  • @sabarishchandramouli8494
    @sabarishchandramouli8494 4 ปีที่แล้ว

    Hi Amit, thanks for the video! I have one doubt at 14:16 in line 34 - update AccountList.
    As part of code bulkification, should we add are records to a separate list and then update it with one DML call. Even here, you are updating the records after the For loop. If we have many records, how will the records hold the count_of_contatcs field value before updating.

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

      You can create a new list and then add the record then update but creating a new list and adding Record into that will consume memory which no one would like to because that can be used for other variables to minimise the governor limit. About the field no of contacts the value in that will be old and after updating there will be a new updated one. I hope you are clear now

  • @harishlokuntla3594
    @harishlokuntla3594 4 ปีที่แล้ว

    Hi Amit, the list we are Updating will have duplicate accoutId if we change the the cantact Account which already have existed contact.

  • @ritabratanagchoudhury9550
    @ritabratanagchoudhury9550 4 ปีที่แล้ว

    Hi Amit, I have one question. Suppose i have a account with a single contact associated to it. I change the account of that contact . Now the No_of_contact field for that account should have the value 0. Will that be possible by using the 3rd solution ????

    • @sfdcpanther
      @sfdcpanther  4 ปีที่แล้ว

      Why don't you give it a try?

  • @chiragrathi6756
    @chiragrathi6756 4 ปีที่แล้ว

    Hi Can you please let me know difference between aura components and lightning world components

    • @sfdcpanther
      @sfdcpanther  4 ปีที่แล้ว

      Hi Chirag,
      There is a playlist for Lightning Web component and in that playlist the first video contains the difference that you are looking for

    • @chiragrathi6756
      @chiragrathi6756 4 ปีที่แล้ว

      Thanks for your reply, For learning lightning what should i learn first aura components or lightning components

  • @athimathisachithanandam8194
    @athimathisachithanandam8194 4 ปีที่แล้ว

    You are my life saver. quick question: I need to write similar logic in Individual Email results(MC table) which is larger table. Will it reach governor limit as large amt of data created/edited at same time? Requirement is to rollup clicked/opened.

  • @tirtharajghosh2680
    @tirtharajghosh2680 3 ปีที่แล้ว

    Hi sir, I cant understand map kiu use kiya at 20.33

    • @sfdcpanther
      @sfdcpanther  3 ปีที่แล้ว

      Please do share more context about your issue, I mean what is the problem or anything

    • @tirtharajghosh2680
      @tirtharajghosh2680 3 ปีที่แล้ว

      At 13.02 I debug the accountlist in console, then it is showing only account id and name. Not showing No of contacts and contacts id and name. Why it is happening, sir?? and also sir why I'm filtering the data with AccountIdset???

  • @karthikshettyan5302
    @karthikshettyan5302 4 ปีที่แล้ว

    Your git code is not updated with what you show on video.

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

    In line no. 20
    accountIdSet.add(con.AccountId);
    This is written. What if the object is a custom object for example my parent object is Department__c and child object is employee__c but when I am writing
    DepIdSet.add(e.Department__cId)
    It says variable doesn't exist..can you please help.

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

      Department__cId is not a valid field api name