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
Paras JainParas Jain 

why we can not do any DML on other object in Before Insert or before update Trigger

why we can not do any DML on other object in Before Insert or before update Trigger
Nagendra ChinchinadaNagendra Chinchinada
Because Before trigger is ment only to act on same record which is beeing inserted or updated (Like  validations, field updates on same record).
Any DML to other objects should be performed in After trigger.
Anurag SaxenaAnurag Saxena
The reason behind this is whenever we are working on cross object.we may require ID for the reference, In the case of before event you will not have that.So it will not succeed because you are performing functionality before it happens.