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
Naveen Reddy 177Naveen Reddy 177 

I have account object in that object one of filed having the validation rule and with the same object with same filed i have trigger operation.which one is first fire ??

Raj VakatiRaj Vakati
On High level 
  1. First Executes all before triggers.
  2. Runs most system validation steps again, such as verifying that all required fields have a non-null value, and runs any user-defined validation rules. The only system validation that Salesforce doesn't run a second time (when the request comes from a standard UI edit page) is the enforcement of layout-specific rules.
  3. The Executes all after trigger

So if you have before trigger it will execute the Before trigger then validaton 
If Its an After trigger 
..First Validation rule then your trigger 


Please refer this link for order of excution 


https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm