@Apex_Hours, please help me understand a few of things here: 1. It appears that the presenter used the terms "handler" and "helper" interchangably here. There is a "helper" class with the business logic and a trigger. Where's the handler class and how is it implemented for the various trigger events?? 2. The presenter is using nested for loops, which is not best practice. Couldn't she have solved for this with a map? 3. The code did not even use the update line that was supposed to concatenate the Contact names into the custom field All_Contacts__c (which is not mentioned anywhere in the video) and since Contacts are shown as related object records on the Account record page anyway, what business problem did this solve? Thank you!
I have a doubt in ContactNameOnAccount trigger, in both if condition you mentioned trigger.isUpdate, so if we update the contact handler will be called two times because both if will be true, if the handler calls two times two values will pass New and Old, how it will be handled by handler?
@Apex_Hours, please help me understand a few of things here: 1. It appears that the presenter used the terms "handler" and "helper" interchangably here. There is a "helper" class with the business logic and a trigger. Where's the handler class and how is it implemented for the various trigger events?? 2. The presenter is using nested for loops, which is not best practice. Couldn't she have solved for this with a map? 3. The code did not even use the update line that was supposed to concatenate the Contact names into the custom field All_Contacts__c (which is not mentioned anywhere in the video) and since Contacts are shown as related object records on the Account record page anyway, what business problem did this solve? Thank you!
Check this hope this will help you www.apexhours.com/trigger-handler-pattern-in-salesforce/
the code which you shown for loop with in for loop we need to use map to reduce space and time complexity.
Check all Salesforce Apex best practice here www.apexhours.com/apex-code-best-practices/
I have a doubt in ContactNameOnAccount trigger, in both if condition you mentioned trigger.isUpdate, so if we update the contact handler will be called two times because both if will be true, if the handler calls two times two values will pass New and Old, how it will be handled by handler?
Learn more about Trigger handler platter here www.apexhours.com/trigger-handler-pattern-in-salesforce/