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
vijay kumar kvijay kumar k 

difference between trigger and processbuilder

bhanu_prakashbhanu_prakash
Hi Vijay
Mark as best answer, If it resloves !!

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

more info : https://www.quora.com/What-is-the-difference-between-trigger-and-workflow-in-salesforce

Mark as resloved if it helps :) :)
Thanks, 
Bhanu Prakash
visit ForceLearn.com​​ (https://www.forcelearn.com)
Tanmay SahaiTanmay Sahai
Hi Vijay,

Kindly refer to the below link:
http://www.adhiman.com/process-builder-vs-apex-triggers-choosing-between-automation-tools/

Please let me know if you need any additional information.

Thanks!
Akshay_DhimanAkshay_Dhiman
Hi Vijay

Workflows 
Simple, but you have very limited possibilities on the logic to be executed
Logic defined via point and click limited 
Logic is limited to a bunch of available actions (update a field on the same record, send emails or outbound messages)
You cannot create a workflow around the deletion of an object
Unit tests are not required

Triggers
More complex, but you have maximum flexibility on the logic to be executed
Logic defined using Apex code
Business logic is pretty much anything you can code
Often needed when a record on a different object has to be created/updated
Unit testing is required
Check these links for more information.
http:// http://www.infallibletechie.com/2013/04/difference-between-triggers-and.html (http://​ http://www.infallibletechie.com/2013/04/difference-between-triggers-and.html)
http:// http://salesforce.stackexchange.com/questions/26929/workflows-vs-triggers (http://​http://salesforce.stackexchange.com/questions/26929/workflows-vs-triggers)
http://www.salesforcetutorial.com/salesforce-interview-questions-answers-part2/

Thanks
Akshay