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
naveen reddy 68naveen reddy 68 

my Question is on workflow, process builder and triggers

When i have workfloew and Process builder for field updates, why should i use apex tirggers for field updates? 
Best Answer chosen by naveen reddy 68
sfdcMonkey.comsfdcMonkey.com
hi naveen
User-added image
let me inform if it helps you
thanks

All Answers

sfdcMonkey.comsfdcMonkey.com
hi naveen
User-added image
let me inform if it helps you
thanks
This was selected as the best answer
sfdcMonkey.comsfdcMonkey.com
* You can use the Process Builder to perform more actions than with workflow:
Create a record
Update any related record
Use a quick action to create a record, update a record, or log a call
Launch a flow
Send an email
Post to Chatter
Submit for approval
Call apex methods
But the process builder doesn’t support outbound messages.

* Workflow does only 4 actions
Create Task
Update Fiel
Email Alert
Outbound Message

* Trigger
A trigger means programming in APEX (a java look-a-like) and you can do things with a trigger that no Workflow actions can do.
We can call an Apex class from 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
needed to kick off some apex code
many other reasons

i hope it helps you
thanks
 
Rowallim TechnologyRowallim Technology
Hi naveen reddy 68
All the three can be used for field updates but the difference is:
(1) Workflow & Process Builder : inbuilt functionality, used on single obj /master-detail
 
 (2) Trigger : Used for complex business process in which multiple Obj can handle. 
 
Before  jump  into coding check first is it possible to solve an issue using workflow & Process Builder.
Regards
Dorian Sutton 9Dorian Sutton 9
It's worth remembering that Processes and Workflows are considerably slower and more resource intensive than Apex Triggers.  They can also be very difficult to debug, as they often give obscure and unhelpful error messages and do not allow you to output to the debug log.
Sankaranarayanan VenkatachalamSankaranarayanan Venkatachalam
Hi Dorian,

I am not sure about the slow performance of Process Builders or Workflows but you are correct about the unhelpful error message when a Process Builder fails. It is very frustrating.