Posts

Showing posts from March, 2020

Trigger and Trigger Context Variables

Hello Devs, hope you all doing well. In this post I'm gonna talk about trigger context variables in details, their consideration and which context variables is available in which trigger event i.e before/after DML. First let's talks about some basics. Trigger is a piece of Apex Code that execute before or after DML operations. There are two types of trigger:-   Before Triggers are used to assign/validate record field values before they are saving to database.   After Triggers are used to update other records by accessing current record's field (record that is in      transaction) which are set by system (mostly we use Id and date fields). Triggers can cause other records to change, and these changes also can, in result, it fires more triggers so apex runtime engine consider all these operation a single piece of task and sets limits on number of operations that can performed to prevent infinite recursion. Now let's talk about trigger Implemen...