Activity Forums Salesforce® Discussions Differenciate between Trigger and Workflow in Salesforce?

  • shariq

    Member
    September 24, 2018 at 4:44 am

    Workflow

    Workflow is 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 data base in one trigger.

  • Anjali

    Member
    September 24, 2018 at 6:51 am

    Hi,

    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)

     

  • Avnish Yadav

    Member
    September 24, 2018 at 8:58 am

    Hello.

    Workflow is a point and clicks Tool which doesn’t need coding. When you want to take actions like Update filed, Email, Outbound message, and create the task from the same object or from child to the parent object(in the master-detail relationship) you can use workflow. You can also perform these action based on time triggers. It’s an automated tool which fires based on Evaluation criteria and rule criteria. Using workflow you can’t create a record.

    A trigger is a programmatic approach which fires when before or after a record is inserted, updated or deleted. Using a trigger you can work on multiple objects. It involves coding you can query and you can perform any DML operation.

    Thanks.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos