Hi Amit , you have not discussed, how can we avoid recursion using trigger framework , please elaborate the same
@anshajsinha27962 жыл бұрын
Found this very helpful, thankyou so much
@mechfire1004 жыл бұрын
I just love ur video...Big fan.your videos mostly give ans for evry possible case
@sfdcpanther4 жыл бұрын
Thank for your feedback 👍
@asish6812 жыл бұрын
Thanks for this video, It's really informative
@harshpanchamiya65334 жыл бұрын
Mind blowing concept, enjoyed learning it. One concern though, you have not discussed how can we avoid recursion using trigger framework. Please explain that if possible.
@saiful5197 Жыл бұрын
How come the handler classes have static method but in dispatcher we are able to call them from handler instance
@inboxoutbox26972 жыл бұрын
Amit, I just want to understand something, at 3:43 you said that the logic won't work for the next 200 records in case of a dml of bulk (data loading tools or batch apex), since the static variable becomes true. Please correct me or help me understand. Here you are referring to the trigger batch size of 200 isn't it? If not which governor limit are you referring to?
@rameshakkineni3 жыл бұрын
Quick quesiton - How are we able to access 'Trigger.new' in TriggerDispatcher class? What happens when triggers on multiple objects are fired at the same time? What does 'Trigger.new' contain in that case? Are triggered queued if multiple triggers on different objects are fired at the same time?
@sfdcpanther3 жыл бұрын
Hello, when you are invoking a class from trigger you can access all the trigger context variable inside that class and depending upon Which object is calling that class trigger.new will contain the data for that object
@rameshakkineni3 жыл бұрын
@@sfdcpanther Makes sense. Thank you so much for the clarification
@saiful5197 Жыл бұрын
To clarify this concept in depth, Context Variable of System.Trigger get their value when a trigger is start executing until it finish executing. When a trigger is executing it set the context variable on current context, so during trigger execution time if you call a apex class method those values are available as long as trigger is executing So basically if trigger call a class method means trigger still executing and you can have context variables for it
@manishmahajan76133 жыл бұрын
Great video. Anything on recursion and on/off flag if trigger is disabled please? It would make it complete
@sfdcpanther3 жыл бұрын
Recursion is something which is different from company to company but yes I will share a newly created framework which I am working on ASAP which have many things and is much easier and faster in working.
@keshavjain8644 Жыл бұрын
@@sfdcpanther did you create video for that if yes please share the link
@lukkypadmavathi37824 жыл бұрын
what is apex trigger execution pattern in salesforce
@sunilmishra9492 Жыл бұрын
I guess framework should be abstract class type in interface base u have to implement all the methods. Let's say on email message object i want one to run in afterinsert then why should we implement all the methods
@sfdcpanther Жыл бұрын
It depends upon business to business however recommended one is always interface reason being every developer and teams are using the same way to develop the code otherwise everyone will use their own way and it will create tech debt at one day which lead to other bigger issues
@chanchaljain94945 жыл бұрын
Hi Amit could you please provide credentials so that we can see the code
@sfdcpanther5 жыл бұрын
You will get the link to GitHub gist where you will get the code . There is complete code
@chanchaljain94945 жыл бұрын
@@sfdcpanther OK thanks
@pavanpalleti85804 жыл бұрын
u removed all the code from trigger and created an extra Handler for each object in addition to the Helper. .... !! how is this reducing the logic ??
@sfdcpanther4 жыл бұрын
The concept of helper and handler is to increase the readability and reusability of the code. Now you can call the same code from various handler and this will reduce the no of lines in your code which Also leads no to writing the Big test class and that will descrease the deployment time. There are so many factors not only one.