• #18957
    Salesforce | Suraj Suraj #188
    Forcetalks

    What is the difference between Trigger and Workflow in salesforce?

    What is the difference between Trigger and Workflow?

     

    #18960
    Salesforce | Saurabh Saurabh #229
    Forcetalks

    Hi Suraj

    Below are  some points that helps you in differentiating between workflow and trigger

    Workflow

    • You cannot create records
      They currently can only result in a task, email, field update, or outbound message
      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)
    • We can not perform Dml operation in workflow
    • We cannot query from database

    Trigger

    • Can do these things, but obviously using code.
      Often needed for roll-up type scenarios where roll up summary fields cannot be used
      Often needed when a record needs to be created on a different object
    • We can use 20 Dml operations in trigger
    • Trigger can be used to invoke a webserive

    Hope this may help you:

    #35190
    Salesforce | shariq shariq #1
    Forcetalks

    Hi,

    Basic Difference – 

    Workflow is automated process that fired an action based on Evaluation criteria and rule criteria. We can access a workflow across the object. Trigger is a piece of code that executes before or after a record is inserted or updated.

    Hope this helps.

    #35342
    Salesforce | Parul Parul #2
    Forcetalks

    Adding some points:

    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.

     

    Thanks

    #39032
    Salesforce | shariq shariq #1
    Forcetalks

    Adding some more points –

    Workflow
    Workflow is automated process that fired an action based on Evaluation criteria and rule criteria.
    Workflow Rules will be helpful to update the same object or master object in custom master-detail relationships.
    We cannot query from database
    Coding is not required.
    Workflows work only after some actions.

    Trigger
    Trigger can work across objects.
    Coding is required.
    Trigger works before and after some actions.

    Hope this helps.

    #39106
    Forcetalks

    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.

    #41337
    Forcetalks

    Hello,

    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

    Thanks.

    #53071
     William #11
    Forcetalks

    Workflow: Workflow is automated process, a point and click which doesn’t need any coding. When you want to take action (email, task, field update or outbound message) for the same object or from Child to parent object, you can use Workflow rules. You cannot perform DML operation on workflow. Workflows work only after some actions.

    Trigger: Trigger is a programmatic code approach which fires when before or after a record is inserted, updated or deleted. Using trigger you can work on multiple objects. You can query and you can perform any DML operation. The trigger works before and after some actions.

Viewing 8 posts - 1 through 8 (of 8 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2018 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?