Different between trigger and workflow
Loading
Different between trigger and workflow
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Naimish MakwanaPosted Jan 24, 2023, 12:00 PM
Workflow
Workflow is an automated process that fired an action based on Evaluation criteria and rule criteria.
We can access a workflow across the object.
We cannot perform DML operation on workflow
We cannot query from database
Trigger
Trigger is a piece of code that executes before or after a record is inserted or updated.
We can access the trigger across the object and related to that objects
We can use 20 DML operations in one trigger.
We can use 20 SOQL’s from database in one trigger.
Vahidkhan LodiPosted Jan 24, 2023, 11:57 AM
Workflows are retired.
Brahma Prakash ShuklaPosted Oct 26, 2022, 9:09 AM
Please find the diifference between trigger and workflow.
Triggers:
1. Trigger can work across objects.
2. Trigger works before and after some actions + On different DML actions like Insert, Update, Delete, Undelete
3. Coding is required.
4. Often needed for roll-up type scenarios where roll up summary fields cannot be used and also when a record needs to be created on a different object
Workflow rules:
1. Workflow Rules will be helpful to update the same object or master object in custom master-detail relationships.
2. Coding is not required and they currently can only result in a task, email, field update, or outbound message
3. Workflows work only after some actions i.e. entry criteria's
4. they can only cross objects in a master detail relationship, from the detail to the master, and only for certain scenarios (all custom to custom objects, some custom to standard objects, and even fewer standard to standard) https://help.salesforce.com/HTViewHelpDoc?id=workflow_cross_object_field_updates.htm&language=en_US
5. you cannot create records from WF
Muhammad Imran AnsariPosted Oct 26, 2022, 6:12 AM
Here are the some differencies between trigger and workflow
Workflow:
Trigger: