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
prabhakar r 3prabhakar r 3 

what is the differnce b/w workflow and triggers

what is the differnce b/w workflow and triggers. and governor limits
Amit VaidyaAmit Vaidya

Trigger:

1) A trigger means programming in APEX and you can do things with a trigger that no Workflow actions can do. In short, for any complex things which can not be done by workflow.
2) We can call an Apex class from trigger.
3) We can perform operations on different objects.
4) Needed for roll-up type scenarios where roll up summary fields cannot be used.
5) Needed when a record needs to be created on a different object.

Workflow:
1) Worksflow rules however, allow you to do a lot of useful thinsg with zero programming, like updating fields and sending out emails based on rules.
2) We can perform operation on one object.
3) You can not create records using workflow.

Note: As a developer, you should always prefer workflow first and if something which is not achievable using workflow then only go for trigger.

Thank you,
Amit
Amit VaidyaAmit Vaidya