Activity › Forums › Salesforce® Discussions › When should Apex be used over Workflow rules or Process Builder in Salesforce?
Tagged: Apex Code, Chatter, Chatter Group, Process Builder, Public Groups, Record, Salesforce Automation, Salesforce Process Builder, Sharing Rules, Workflow Rules
-
When should Apex be used over Workflow rules or Process Builder in Salesforce?
Posted by Achintya on August 13, 2019 at 5:21 AMWhen should Apex be used over Workflow Rules or Process Builder in Salesforce?
Hariom Chaudhary replied 6 years, 9 months ago 3 Members · 2 Replies -
2 Replies
-
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. - [adinserter block='9']
-
Hi Achint,
There are some key differences between apex, workflow rules, process builder.
Workflow can perform only the following actions.
- Update a field
- Send an email
- Create a Task
Send an outbound message (communication with another system)
Process builder have some extra features as:
- Create a record (not just Tasks!)
- Update related records
- Launch a Quick Action
- Post to Chatter
- Launch a Flow
- Call Apex code
- Submit for approval
- Invoke another process
And apex is for any kind of business requirement, like
- Delete records
- Update unrelated records
- Share records with more complex criteria than Sharing Rules permits
- Add/remove users in Chatter Groups and Public Groups
- Create email templates that pull info from multiple records and Objects (combined with Visualforce)
- And more
Log In to reply.