Activity Forums Salesforce® Discussions When should Apex be used over Workflow rules or Process Builder in Salesforce?

  • Saddam

    Member
    August 13, 2019 at 5:43 am

    There are various reasons why you should use Apex over declarative automation options:

    -Workflow rules and Process Builder operations sometimes have feature limitations that can be overcome with Apex. For example, pulling information from an external system.
    -When dealing with certain or large sets of data, Apex can be more efficient than declarative options due to less limitations.

  • Hariom Chaudhary

    Member
    August 13, 2019 at 5:52 am

    Hi Achint,

    There are some key differences between apex, workflow rules, process builder.

    Workflow can perform only the following actions.

    1. Update a field
    2. Send an email
    3. Create a Task

    Send an outbound message (communication with another system)

    Process builder have some extra features as:

    1. Create a record (not just Tasks!)
    2. Update related records
    3. Launch a Quick Action
    4. Post to Chatter
    5. Launch a Flow
    6. Call Apex code
    7. Submit for approval
    8. Invoke another process

    And apex is for any kind of business requirement, like

    1. Delete records
    2. Update unrelated records
    3. Share records with more complex criteria than Sharing Rules permits
    4. Add/remove users in Chatter Groups and Public Groups
    5. Create email templates that pull info from multiple records and Objects (combined with Visualforce)
    6. And more

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos