+ Start a Discussion
vijay bhaskarvijay bhaskar 

triggers vs validation rules diff............

pconpcon
This is like asking for a comparision of apples an motorcycles.

Triggers are apex code that can do lots of operations on the insert, update, delete or undelete of an object.  As part of the trigger, you can do an addError and this will fail the batch of objects and will bubble up to your view layer.

Validation rules are configuration setting on an object that if a formula evaluates to true then the insert / update of the object will be blocked.