function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rohit SharmaGRohit SharmaG 

Trigger Event

Hi All,

I have 2 trigger with before event and logic was one for insert and other for update :

Trigger 1:
trigger Test_trigger_event2 on Account (before insert, before update) {

   if (trigger.isBefore) {
        if (trigger.isInsert) {
            //DO SOMETHING
    system.debug('This is inser and Update');

        }
    }
------------------------------------------------------------------------------------------
Trigger 2.

trigger Test_Trigger_event on Account (before update) {

      
  if (trigger.isUpdate)  {
            //DO SOMETHING
        system.debug('@@@@@@@@@@@@ in Update');            

        }
 }

But When i am inserting record trigger 2 was firing , but it should not fired , it will fired only in update  operation ,not in insert operation.
Please let me know what changes needed in trigger 2.
Thanks!!
 
SF AdminSF Admin
This may be because your first trigger is invoking the 2nd trigger.