What is the difference between Trigger and Workflow?

1 votes
Simone Palmer asked 30-Jan-2018 in SalesForce by Simone Palmer

What is the difference between Trigger and Workflow?

1 Answer

2 votes
Tarun Gautam answered 31-Jan-2018 by Tarun Gautam

Triggers and Workflow rules are the most important and powerful tools. Both having our own Pros and Cons. Below we have listed some of the points:


  • A trigger is a very powerful control in Salesforce. If you want to do a lot of coding then it is best to use a Trigger that executes before or after when a record inserted, updated or deleted.
  • You can access the Trigger beyond the object and related to that objects.
  • You can execute 20 DML operations in one trigger.
  • You can execute 20 SOQL’s from database in one trigger.
  • A trigger can work across objects.
  • Coding is required for the Triggers.
  • Trigger executes on before and after some actions.

Workflow rules:

  • Workflow Rules are the longest standing and time-tested automated process that fired an action based on Evaluation criteria and rule criteria.
  • You cannot perform DML operation on Workflow rules.
  • You cannot query from a database by Workflow rule.
  • It is a Rules which will be helpful to update the same object or master object in custom master-detail relationships.
  • For workflow rules, there is no Coding required.
  • Workflows are also worked only after some actions.
  • Workflow rules can send outbound messages that can’t be done using flows or process builders.