SlideShare a Scribd company logo
1 of 14
Download to read offline
USING THE
RIGHT TOOL
FOR THE
JOB
CHRIS BALDOCK - LINKEDIN.COM/IN/CHRIS-J-BALDOCK
SYDNEY SALESFORCE DEVELOPER MEETUP (15TH NOV 2018)
TWO COMMON MYTHS
• Always choose clicks over code
• Workflow is old news. Process builder all the way!
Name Presenter | xx Month 2016 |
OPTIONS
Workflow vs. Process Builder vs. Apex
• Workflow is quick to build, scalable BUT has limited functionality
• Process Builder / Flow can satisfy most requirements, is quick to build/maintain BUT has serious scalability considerations
• Apex can do pretty much anything, is scalable BUT requires additional effort to build/maintain
EXECUTION CONTEXT
What Happens When You Create/Update A Record
• Any Insert/Update made to a record kicks off a series of actions which together make up the “Execution Context”
• Any Workflow, Process Builder or Apex that is invoked can result in the consumption of governor limits
• Key Governor Limits which we need to be mindful of include (but are not limited to):
• Maximum 150 DML (inserts/update/delete requests) in a transaction
• Maximum 100 SOQL queries in a transaction
• Maximum 50,000 records queried by all SOQL within the transaction
• Maximum 10 seconds of CPU time for the entire transaction to complete
• Hitting platform limits within a transaction can/will break custom-built functionality
Special Note Regarding Workflow and Process Builder
• Workflow updates are fast and do not consume DML or SOQL (but do consume CPU and will kick of +1 round of triggers)
• Process Builder updates are slower and can have a multiplier effect on total DML and SOQL consumed
ORDER OF EXECUTION
WORKFLOW – HIGH LEVEL
Workflow Evaluated
• Ease Of Use: Very easy to build/maintain
• Functionality: Basic Record Updates, Email Alerts, Task
Creation, Outbound Messages
• Scalability: Consume no DML or SOQL
• Debugging: Very robust, unlikely to break
• Error Handling: Very robust, unlikely to break
• Performance: Fast
• Time To Deploy: Very quick to build / deploy
WORKFLOW - CONSIDERATIONS
Workflow considerations
• Don’t consume SOQL or DML limits!!!
• Fire after triggers
• Cannot handle delete and undelete DML
• Cannot control order in which Workflows fire
• Field updates skip validation rules
• Field updates result in Before Trigger and After Trigger firing once more (but only once more)
• Output actions limited to:
• Update Record or Parent Record (If detail in Master-Detail object)
• Create Task
• Send Email Alert
• Send Outbound Message
• Time-based action including any of the above
• Per Workflow, limited to:
• 10 Update Actions, 10 Create Actions, 10 Email Alerts, 10 Outbound Messages
USE WORKFLOW WHEN…
Some guidelines:
• You need to:
• Update Record or Parent M-D Record (up-to 10 per WF)
• Create Task (up-to 10 per WF)
• Send Email Alert (up-to 10 per WF)
• Send Outbound Message (up-to 10 per WF)
• There are no key dependencies between workflows (I.e. workflow B does not depend on the execution of workflow A)
• You understand that the field update or task insert will ignore validation rules
PROCESS BUILDER – HIGH LEVEL
Process Builder Evaluated
• Ease Of Use: Easy to build/maintain
• Functionality: Can meet most requirements
• Scalability: Risk of hitting limits if used improperly
• Debugging: Need to use error emails and debug logs
• Error Handling: Giant block of red error text
• Performance: Slow relative to Apex or Workflow
• Time To Deploy: Very quick to build / deploy
PROCESS BUILDER - CONSIDERATIONS
Process builder considerations
• Fire after triggers and workflows
• Cannot handle delete and undelete DML
• Scheduled record update actions skip validation rules (regular actions respect validation rules)
• No ability to catch and handle exceptions (so no ability to log or report on these exceptions)
• Slower than the equivalent function written in Apex which means an increased chance of hitting CPU limit
• Are subject to governor limits (unlike workflow):
• Each record Create action uses a single DML
• Each record Update action uses a single DML and a single SOQL query
• Each Post To Chatter, Submit For Approval, Quick Action uses a single DML
• Are not completely bulkified! https://success.salesforce.com/ideaView?id=0873A000000cM6iQAE
• Every update or create action will result in a new save procedure
• When coupled with triggers this can create a large multiplier effect on DML, SOQL and CPU!
USE PROCESS BUILDER WHEN…
Some guidelines:
• There exists no triggers for the object in question
• The object in question is not a core object (e.g. Account, Contact, Lead or Opportunity)
• Requirement cannot be met using workflow
• You understand the impact your process builder will have on governor limits
• You need to:
• Have branching logic e.g. perform different actions based on case status (Not possible in Workflow)
• React to the insertion of a Platform Event (Not possible in Workflow)
• Publish a platform event (Not possible in Workflow)
• Create record other than task (Not possible in Workflow)
• Update related record(s) other than parent in m-d relationship (Not possible in Workflow)
• Post to chatter (Not possible in Workflow)
• Initiate Process Builder (Not possible in Workflow)
• Initiate Flow (Not possible in Workflow)
• Initiate Quick Action (Not possible in Workflow)
APEX – HIGH LEVEL
Apex Evaluated
• Ease Of Use: Requires coding skillset
• Functionality: Can do pretty much anything
• Scalability: Consumes limits but provide granular controls
• Debugging: Granular debugging tools
• Error Handling: Granular exception handling
• Performance: Fast
• Time To Deploy: Slowest of the bunch to build
APEX – CONSIDERATIONS + GUIDELINES FOR USE
Apex considerations
• Require greatest effort to build and maintain
• All code must have >75% test coverage (though forces unit testing which is a good thing!)
• Are subject to governor limits (but make far more efficient use of limits vs. process builder)
Use Apex When:
• Building functionality for a core object (e.g. Account, Contact, Lead, Opportunity or any other that is solution critical)
• You need to satisfy a complex or detailed business process
• You need to perform validations across multiple objects
• You need to integrate with a third party system
EXAMPLE DECISION FLOW

More Related Content

What's hot

Workshop New Relic - juni 2015
Workshop New Relic - juni 2015Workshop New Relic - juni 2015
Workshop New Relic - juni 2015
Byte
 
JIRA Performance Testing in Pictures - Edward Bukoski Michael March
JIRA Performance Testing in Pictures - Edward Bukoski Michael MarchJIRA Performance Testing in Pictures - Edward Bukoski Michael March
JIRA Performance Testing in Pictures - Edward Bukoski Michael March
Atlassian
 

What's hot (20)

Spring Boot
Spring BootSpring Boot
Spring Boot
 
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...
 
Continuous Deployment of your Application - SpringOne Tour Dallas
Continuous Deployment of your Application - SpringOne Tour DallasContinuous Deployment of your Application - SpringOne Tour Dallas
Continuous Deployment of your Application - SpringOne Tour Dallas
 
Supervise your Akka actors
Supervise your Akka actorsSupervise your Akka actors
Supervise your Akka actors
 
Workshop New Relic - juni 2015
Workshop New Relic - juni 2015Workshop New Relic - juni 2015
Workshop New Relic - juni 2015
 
Saltconf16 william-cannon b
Saltconf16 william-cannon bSaltconf16 william-cannon b
Saltconf16 william-cannon b
 
JIRA Performance Testing in Pictures - Edward Bukoski Michael March
JIRA Performance Testing in Pictures - Edward Bukoski Michael MarchJIRA Performance Testing in Pictures - Edward Bukoski Michael March
JIRA Performance Testing in Pictures - Edward Bukoski Michael March
 
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
 
Avoiding integration hell
Avoiding integration hellAvoiding integration hell
Avoiding integration hell
 
Salesforce Process builder Vs Workflows
Salesforce Process builder Vs WorkflowsSalesforce Process builder Vs Workflows
Salesforce Process builder Vs Workflows
 
You don’t need DTAP + Backbase implementation - Amsterdam 17-12-2015
You don’t need DTAP + Backbase implementation - Amsterdam 17-12-2015You don’t need DTAP + Backbase implementation - Amsterdam 17-12-2015
You don’t need DTAP + Backbase implementation - Amsterdam 17-12-2015
 
React suspense, not just for Alfred Hitchcock
React suspense, not just for Alfred HitchcockReact suspense, not just for Alfred Hitchcock
React suspense, not just for Alfred Hitchcock
 
Serverless Delivery
Serverless DeliveryServerless Delivery
Serverless Delivery
 
Introduction to GOCD - Amulya Sharma
Introduction to GOCD - Amulya SharmaIntroduction to GOCD - Amulya Sharma
Introduction to GOCD - Amulya Sharma
 
Manage your environment with DSC
Manage your environment with DSCManage your environment with DSC
Manage your environment with DSC
 
Deployment Automation - My journey at Peazie
Deployment Automation - My journey at PeazieDeployment Automation - My journey at Peazie
Deployment Automation - My journey at Peazie
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
JustLetMeCode-Final
JustLetMeCode-FinalJustLetMeCode-Final
JustLetMeCode-Final
 
JUST EAT: Tools we use to enable our culture
JUST EAT: Tools we use to enable our cultureJUST EAT: Tools we use to enable our culture
JUST EAT: Tools we use to enable our culture
 
Pragmatic Continuous Delivery - ReaktorDevDay 2012
Pragmatic Continuous Delivery - ReaktorDevDay 2012Pragmatic Continuous Delivery - ReaktorDevDay 2012
Pragmatic Continuous Delivery - ReaktorDevDay 2012
 

Similar to Using The Right Tool For The Job

EM12c Monitoring, Metric Extensions and Performance Pages
EM12c Monitoring, Metric Extensions and Performance PagesEM12c Monitoring, Metric Extensions and Performance Pages
EM12c Monitoring, Metric Extensions and Performance Pages
Enkitec
 
Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”
EPAM Systems
 
Lotuscript for large systems
Lotuscript for large systemsLotuscript for large systems
Lotuscript for large systems
Bill Buchan
 

Similar to Using The Right Tool For The Job (20)

SynapseIndia drupal presentation on drupal info
SynapseIndia drupal  presentation on drupal infoSynapseIndia drupal  presentation on drupal info
SynapseIndia drupal presentation on drupal info
 
Process Builder Automation and Considerations
Process Builder Automation and ConsiderationsProcess Builder Automation and Considerations
Process Builder Automation and Considerations
 
Advantages of Rails Framework
Advantages of Rails FrameworkAdvantages of Rails Framework
Advantages of Rails Framework
 
Ioug oow12 em12c
Ioug oow12 em12cIoug oow12 em12c
Ioug oow12 em12c
 
Extreme Makeover OnBase Edition
Extreme Makeover OnBase EditionExtreme Makeover OnBase Edition
Extreme Makeover OnBase Edition
 
Road to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comRoad to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.com
 
EM12c Monitoring, Metric Extensions and Performance Pages
EM12c Monitoring, Metric Extensions and Performance PagesEM12c Monitoring, Metric Extensions and Performance Pages
EM12c Monitoring, Metric Extensions and Performance Pages
 
Continuous Delivery: How RightScale Releases Weekly
Continuous Delivery: How RightScale Releases WeeklyContinuous Delivery: How RightScale Releases Weekly
Continuous Delivery: How RightScale Releases Weekly
 
python_development.pptx
python_development.pptxpython_development.pptx
python_development.pptx
 
Introducing the Apache Flink Kubernetes Operator
Introducing the Apache Flink Kubernetes OperatorIntroducing the Apache Flink Kubernetes Operator
Introducing the Apache Flink Kubernetes Operator
 
Project Sherpa: How RightScale Went All in on Docker
Project Sherpa: How RightScale Went All in on DockerProject Sherpa: How RightScale Went All in on Docker
Project Sherpa: How RightScale Went All in on Docker
 
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
 
Ten query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowTen query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should know
 
Why retail companies can't afford database downtime
Why retail companies can't afford database downtimeWhy retail companies can't afford database downtime
Why retail companies can't afford database downtime
 
Performance testing with 100,000 concurrent users in AWS
Performance testing with 100,000 concurrent users in AWSPerformance testing with 100,000 concurrent users in AWS
Performance testing with 100,000 concurrent users in AWS
 
Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”
 
WinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf 2016 - Michael Greene - Release PipelinesWinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf 2016 - Michael Greene - Release Pipelines
 
Salesforce Lightning Process builder
Salesforce Lightning Process builderSalesforce Lightning Process builder
Salesforce Lightning Process builder
 
Lotuscript for large systems
Lotuscript for large systemsLotuscript for large systems
Lotuscript for large systems
 
Performance tuning Grails applications
Performance tuning Grails applicationsPerformance tuning Grails applications
Performance tuning Grails applications
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 

Using The Right Tool For The Job

  • 1. USING THE RIGHT TOOL FOR THE JOB CHRIS BALDOCK - LINKEDIN.COM/IN/CHRIS-J-BALDOCK SYDNEY SALESFORCE DEVELOPER MEETUP (15TH NOV 2018)
  • 2. TWO COMMON MYTHS • Always choose clicks over code • Workflow is old news. Process builder all the way!
  • 3. Name Presenter | xx Month 2016 | OPTIONS Workflow vs. Process Builder vs. Apex • Workflow is quick to build, scalable BUT has limited functionality • Process Builder / Flow can satisfy most requirements, is quick to build/maintain BUT has serious scalability considerations • Apex can do pretty much anything, is scalable BUT requires additional effort to build/maintain
  • 4. EXECUTION CONTEXT What Happens When You Create/Update A Record • Any Insert/Update made to a record kicks off a series of actions which together make up the “Execution Context” • Any Workflow, Process Builder or Apex that is invoked can result in the consumption of governor limits • Key Governor Limits which we need to be mindful of include (but are not limited to): • Maximum 150 DML (inserts/update/delete requests) in a transaction • Maximum 100 SOQL queries in a transaction • Maximum 50,000 records queried by all SOQL within the transaction • Maximum 10 seconds of CPU time for the entire transaction to complete • Hitting platform limits within a transaction can/will break custom-built functionality Special Note Regarding Workflow and Process Builder • Workflow updates are fast and do not consume DML or SOQL (but do consume CPU and will kick of +1 round of triggers) • Process Builder updates are slower and can have a multiplier effect on total DML and SOQL consumed
  • 6. WORKFLOW – HIGH LEVEL Workflow Evaluated • Ease Of Use: Very easy to build/maintain • Functionality: Basic Record Updates, Email Alerts, Task Creation, Outbound Messages • Scalability: Consume no DML or SOQL • Debugging: Very robust, unlikely to break • Error Handling: Very robust, unlikely to break • Performance: Fast • Time To Deploy: Very quick to build / deploy
  • 7. WORKFLOW - CONSIDERATIONS Workflow considerations • Don’t consume SOQL or DML limits!!! • Fire after triggers • Cannot handle delete and undelete DML • Cannot control order in which Workflows fire • Field updates skip validation rules • Field updates result in Before Trigger and After Trigger firing once more (but only once more) • Output actions limited to: • Update Record or Parent Record (If detail in Master-Detail object) • Create Task • Send Email Alert • Send Outbound Message • Time-based action including any of the above • Per Workflow, limited to: • 10 Update Actions, 10 Create Actions, 10 Email Alerts, 10 Outbound Messages
  • 8. USE WORKFLOW WHEN… Some guidelines: • You need to: • Update Record or Parent M-D Record (up-to 10 per WF) • Create Task (up-to 10 per WF) • Send Email Alert (up-to 10 per WF) • Send Outbound Message (up-to 10 per WF) • There are no key dependencies between workflows (I.e. workflow B does not depend on the execution of workflow A) • You understand that the field update or task insert will ignore validation rules
  • 9. PROCESS BUILDER – HIGH LEVEL Process Builder Evaluated • Ease Of Use: Easy to build/maintain • Functionality: Can meet most requirements • Scalability: Risk of hitting limits if used improperly • Debugging: Need to use error emails and debug logs • Error Handling: Giant block of red error text • Performance: Slow relative to Apex or Workflow • Time To Deploy: Very quick to build / deploy
  • 10. PROCESS BUILDER - CONSIDERATIONS Process builder considerations • Fire after triggers and workflows • Cannot handle delete and undelete DML • Scheduled record update actions skip validation rules (regular actions respect validation rules) • No ability to catch and handle exceptions (so no ability to log or report on these exceptions) • Slower than the equivalent function written in Apex which means an increased chance of hitting CPU limit • Are subject to governor limits (unlike workflow): • Each record Create action uses a single DML • Each record Update action uses a single DML and a single SOQL query • Each Post To Chatter, Submit For Approval, Quick Action uses a single DML • Are not completely bulkified! https://success.salesforce.com/ideaView?id=0873A000000cM6iQAE • Every update or create action will result in a new save procedure • When coupled with triggers this can create a large multiplier effect on DML, SOQL and CPU!
  • 11. USE PROCESS BUILDER WHEN… Some guidelines: • There exists no triggers for the object in question • The object in question is not a core object (e.g. Account, Contact, Lead or Opportunity) • Requirement cannot be met using workflow • You understand the impact your process builder will have on governor limits • You need to: • Have branching logic e.g. perform different actions based on case status (Not possible in Workflow) • React to the insertion of a Platform Event (Not possible in Workflow) • Publish a platform event (Not possible in Workflow) • Create record other than task (Not possible in Workflow) • Update related record(s) other than parent in m-d relationship (Not possible in Workflow) • Post to chatter (Not possible in Workflow) • Initiate Process Builder (Not possible in Workflow) • Initiate Flow (Not possible in Workflow) • Initiate Quick Action (Not possible in Workflow)
  • 12. APEX – HIGH LEVEL Apex Evaluated • Ease Of Use: Requires coding skillset • Functionality: Can do pretty much anything • Scalability: Consumes limits but provide granular controls • Debugging: Granular debugging tools • Error Handling: Granular exception handling • Performance: Fast • Time To Deploy: Slowest of the bunch to build
  • 13. APEX – CONSIDERATIONS + GUIDELINES FOR USE Apex considerations • Require greatest effort to build and maintain • All code must have >75% test coverage (though forces unit testing which is a good thing!) • Are subject to governor limits (but make far more efficient use of limits vs. process builder) Use Apex When: • Building functionality for a core object (e.g. Account, Contact, Lead, Opportunity or any other that is solution critical) • You need to satisfy a complex or detailed business process • You need to perform validations across multiple objects • You need to integrate with a third party system