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
mahesh reddy 4mahesh reddy 4 

after insert and after update trigger

I wrote one after insert and after update trigger. when i change the status field to closed the trigger is executing. Problem is when i click that record
and update with the same data the trigger executing same? It updating the inventory again and again ? Any idea?
MithunPMithunP
Hi Mahesh,

Can you explain your issue more and share your trigger code.

Best Regards,
Mithun.
Bhanu MaheshBhanu Mahesh
Hi Mahesh,

After update event trigger is fired whenever there is an update DML operation on the record.

If you click Edit and even if you are not changing any values and then click on save, update DMl operation will be performed on the record. That is the reason why trigger is firing.

It is always a best practice to compare  the new values and old values of the record so that the trigger will perform that functionality only at specific scenarios. Otherwise it will fire and the entire trigger will run.

Regards,
Bhanu Mahesh