SlideShare a Scribd company logo
1 of 15
Download to read offline
Live Coding with Salesforce Developers
July 31, 2019
Decoupling Triggers
with Kevin Poorman & Simon Goodyear
Simon Goodyear
Developer Evangelist, Salesforce.com
Knows a guy who tried to import Jars
from Static Resources
Live Coding with Simon Goodyear & Kevin Poorman
Kevin Poorman @codefriar
Head of Salesforce, Oodle Car
Finance
Favorite Song: Careless Whisper
Introductions
FLS, not just for field level security anymore
Explanation of the problem
Coding our solution
Recap
Talking about what we’re gonna talk about. #meta
Today’s Agenda
This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the
assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we
make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber
growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief,
any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new
products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays
in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the
immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth,
new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger
enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form
10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important
disclosures are available on the SEC Filings section of the Investor Information section of our Website.
Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be
delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available.
Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
Statement under the Private Securities Litigation Reform Act of 1995
Forward-Looking Statement
If only because it shows you all how tightly
coupled everything is!
Packaging is the bee’s knees
Decoupling Triggers
Trigger Best Practice says:
One Trigger Per Object!
Logic in handler classes.
Allows for controlled order of operation.
But keeping order?
If two packages both contain triggers on the same object how do you
Not create a dependency between the two packages?
Which package gets the actual trigger?.
Maintain the best practice of a single trigger per object?
What if two packages have a trigger on the same object?
The Packaging Problem
Goals:
Keep to one trigger per object.
Enable independent package updates.
Provide an elegant framework for Triggers.
We’ll use:
A trigger framework
Custom Metadata
Meta progamming
Our solution.
Decoupling for the win.
https://github.com/codefriar/DecouplingWithSimonGoodyear
We’re working with this project:
This way to the code
In case Kevin forgets, this is where we (finally) get away
from the slides and to the coding bits.
Today we
Learned how to use a trigger framework to
Decouple trigger execution from logic.
Prevent cross-package dependencies.
Use Custom Metadata, along with Meta Programming to dynamically instantiate classes
Made GLORIOUS typos.
Key Takeaways
Packaging is the way to go but it can take some work to break a large org up into packages.
Triggers are often especially hard to break up, because best practice has always been to have a
single trigger per object!
Custom metadata can help you dynamically define what logic is run, and when
Meta programming can help you convert strings, into instances of classes!
Remember this!
Complete the CI Trailmix:
https://sforce.co/2GF86ds
trailhead.salesforce.com
Q & A
Try Trailhead: trailhead.salesforce.com
Join the conversation: @salesforcedevs
Live Coding with Salesforce Developers: Decoupling your org with Triggers

More Related Content

What's hot

Doc is Dead! How Walkthroughs Changed Salesforce's Content Strategy
Doc is Dead! How Walkthroughs Changed Salesforce's Content StrategyDoc is Dead! How Walkthroughs Changed Salesforce's Content Strategy
Doc is Dead! How Walkthroughs Changed Salesforce's Content StrategyGavin Austin
 
Easy No-Code Integrations with External Services and Visual Flow
Easy No-Code Integrations with External Services and Visual FlowEasy No-Code Integrations with External Services and Visual Flow
Easy No-Code Integrations with External Services and Visual FlowSalesforce Developers
 
Salesforce at Continuous Delivery Foundation Summit
Salesforce at Continuous Delivery Foundation SummitSalesforce at Continuous Delivery Foundation Summit
Salesforce at Continuous Delivery Foundation SummitMark Interrante
 
Lightning Platform Product Managers: Ask Us Anything!
Lightning Platform Product Managers: Ask Us Anything!Lightning Platform Product Managers: Ask Us Anything!
Lightning Platform Product Managers: Ask Us Anything!Salesforce Developers
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectIntegrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectSalesforce Developers
 
Build Apple Watch Apps for the Enterprise
Build Apple Watch Apps for the EnterpriseBuild Apple Watch Apps for the Enterprise
Build Apple Watch Apps for the EnterpriseSalesforce Developers
 
S1 Tour Paris Developpeurs
S1 Tour Paris DeveloppeursS1 Tour Paris Developpeurs
S1 Tour Paris DeveloppeursPeter Chittum
 
Force.com Friday: Intro to Force.com Slides
Force.com Friday: Intro to Force.com SlidesForce.com Friday: Intro to Force.com Slides
Force.com Friday: Intro to Force.com SlidesSalesforce Developers
 
Salesforce Known Issues: The Lifecycle of a Bug
Salesforce Known Issues: The Lifecycle of a BugSalesforce Known Issues: The Lifecycle of a Bug
Salesforce Known Issues: The Lifecycle of a BugSalesforce Developers
 
#DF17Recap series: Make apps smarter with Einstein
#DF17Recap series: Make apps smarter with Einstein#DF17Recap series: Make apps smarter with Einstein
#DF17Recap series: Make apps smarter with EinsteinSalesforce Developers
 
Agile2013 - How Writers Can Thrive in Agile Software Development
Agile2013 - How Writers Can Thrive in Agile Software DevelopmentAgile2013 - How Writers Can Thrive in Agile Software Development
Agile2013 - How Writers Can Thrive in Agile Software DevelopmentGavin Austin
 
Write Powerful Communication to Get Your Stakeholder's Attention by Andrea Ho...
Write Powerful Communication to Get Your Stakeholder's Attention by Andrea Ho...Write Powerful Communication to Get Your Stakeholder's Attention by Andrea Ho...
Write Powerful Communication to Get Your Stakeholder's Attention by Andrea Ho...Salesforce Admins
 
#DF17Recap series: Integrate apps easier with the Salesforce platform
#DF17Recap series: Integrate apps easier with the Salesforce platform#DF17Recap series: Integrate apps easier with the Salesforce platform
#DF17Recap series: Integrate apps easier with the Salesforce platformSalesforce Developers
 
Rollin' Out Lightnin' Ain't All That Frightenin' by Jon Barlow
Rollin' Out Lightnin' Ain't All That Frightenin' by Jon BarlowRollin' Out Lightnin' Ain't All That Frightenin' by Jon Barlow
Rollin' Out Lightnin' Ain't All That Frightenin' by Jon BarlowSalesforce Admins
 
Scale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceScale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceSalesforce Developers
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectIntegrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectSalesforce Developers
 
How to Choose the Right Automation Tool by Jonathan Hackworth
How to Choose the Right Automation Tool by Jonathan Hackworth How to Choose the Right Automation Tool by Jonathan Hackworth
How to Choose the Right Automation Tool by Jonathan Hackworth Salesforce Admins
 
CodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsCodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsSalesforce Developers
 
Scaling Developer Efforts with Salesforce Marketing Cloud
Scaling Developer Efforts with Salesforce Marketing CloudScaling Developer Efforts with Salesforce Marketing Cloud
Scaling Developer Efforts with Salesforce Marketing CloudSalesforce Developers
 

What's hot (20)

Doc is Dead! How Walkthroughs Changed Salesforce's Content Strategy
Doc is Dead! How Walkthroughs Changed Salesforce's Content StrategyDoc is Dead! How Walkthroughs Changed Salesforce's Content Strategy
Doc is Dead! How Walkthroughs Changed Salesforce's Content Strategy
 
Easy No-Code Integrations with External Services and Visual Flow
Easy No-Code Integrations with External Services and Visual FlowEasy No-Code Integrations with External Services and Visual Flow
Easy No-Code Integrations with External Services and Visual Flow
 
Salesforce at Continuous Delivery Foundation Summit
Salesforce at Continuous Delivery Foundation SummitSalesforce at Continuous Delivery Foundation Summit
Salesforce at Continuous Delivery Foundation Summit
 
Lightning Platform Product Managers: Ask Us Anything!
Lightning Platform Product Managers: Ask Us Anything!Lightning Platform Product Managers: Ask Us Anything!
Lightning Platform Product Managers: Ask Us Anything!
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectIntegrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS Connect
 
Build Apple Watch Apps for the Enterprise
Build Apple Watch Apps for the EnterpriseBuild Apple Watch Apps for the Enterprise
Build Apple Watch Apps for the Enterprise
 
S1 Tour Paris Developpeurs
S1 Tour Paris DeveloppeursS1 Tour Paris Developpeurs
S1 Tour Paris Developpeurs
 
Force.com Friday: Intro to Force.com Slides
Force.com Friday: Intro to Force.com SlidesForce.com Friday: Intro to Force.com Slides
Force.com Friday: Intro to Force.com Slides
 
Salesforce Known Issues: The Lifecycle of a Bug
Salesforce Known Issues: The Lifecycle of a BugSalesforce Known Issues: The Lifecycle of a Bug
Salesforce Known Issues: The Lifecycle of a Bug
 
#DF17Recap series: Make apps smarter with Einstein
#DF17Recap series: Make apps smarter with Einstein#DF17Recap series: Make apps smarter with Einstein
#DF17Recap series: Make apps smarter with Einstein
 
Agile2013 - How Writers Can Thrive in Agile Software Development
Agile2013 - How Writers Can Thrive in Agile Software DevelopmentAgile2013 - How Writers Can Thrive in Agile Software Development
Agile2013 - How Writers Can Thrive in Agile Software Development
 
Write Powerful Communication to Get Your Stakeholder's Attention by Andrea Ho...
Write Powerful Communication to Get Your Stakeholder's Attention by Andrea Ho...Write Powerful Communication to Get Your Stakeholder's Attention by Andrea Ho...
Write Powerful Communication to Get Your Stakeholder's Attention by Andrea Ho...
 
#DF17Recap series: Integrate apps easier with the Salesforce platform
#DF17Recap series: Integrate apps easier with the Salesforce platform#DF17Recap series: Integrate apps easier with the Salesforce platform
#DF17Recap series: Integrate apps easier with the Salesforce platform
 
Rollin' Out Lightnin' Ain't All That Frightenin' by Jon Barlow
Rollin' Out Lightnin' Ain't All That Frightenin' by Jon BarlowRollin' Out Lightnin' Ain't All That Frightenin' by Jon Barlow
Rollin' Out Lightnin' Ain't All That Frightenin' by Jon Barlow
 
Scale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceScale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in Salesforce
 
Summer '18 Developer Highlights
Summer '18 Developer HighlightsSummer '18 Developer Highlights
Summer '18 Developer Highlights
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectIntegrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS Connect
 
How to Choose the Right Automation Tool by Jonathan Hackworth
How to Choose the Right Automation Tool by Jonathan Hackworth How to Choose the Right Automation Tool by Jonathan Hackworth
How to Choose the Right Automation Tool by Jonathan Hackworth
 
CodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsCodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web Components
 
Scaling Developer Efforts with Salesforce Marketing Cloud
Scaling Developer Efforts with Salesforce Marketing CloudScaling Developer Efforts with Salesforce Marketing Cloud
Scaling Developer Efforts with Salesforce Marketing Cloud
 

Similar to Live Coding with Salesforce Developers: Decoupling your org with Triggers

CodeLive with Cynthia Thomas - Refactoring data dependent code.
CodeLive with Cynthia Thomas - Refactoring data dependent code.CodeLive with Cynthia Thomas - Refactoring data dependent code.
CodeLive with Cynthia Thomas - Refactoring data dependent code.JackGuo20
 
Live Coding with Salesforce Developers: Adding CI to Your Salesforce Project
Live Coding with Salesforce Developers: Adding CI to Your Salesforce ProjectLive Coding with Salesforce Developers: Adding CI to Your Salesforce Project
Live Coding with Salesforce Developers: Adding CI to Your Salesforce ProjectDeveloper Force
 
CodeLive with Adam Daw - Building a mobile friendly geolocation aware candy t...
CodeLive with Adam Daw - Building a mobile friendly geolocation aware candy t...CodeLive with Adam Daw - Building a mobile friendly geolocation aware candy t...
CodeLive with Adam Daw - Building a mobile friendly geolocation aware candy t...JackGuo20
 
Code live with ryan headley code reviews done right
Code live with ryan headley   code reviews done rightCode live with ryan headley   code reviews done right
Code live with ryan headley code reviews done rightJackGuo20
 
Code live with Brian Kwong - Visualforce to Lwc
Code live with Brian Kwong - Visualforce to LwcCode live with Brian Kwong - Visualforce to Lwc
Code live with Brian Kwong - Visualforce to LwcJackGuo20
 
Developer Preview Live – Release Readiness LIVE, Spring '18
Developer Preview Live – Release Readiness LIVE, Spring '18Developer Preview Live – Release Readiness LIVE, Spring '18
Developer Preview Live – Release Readiness LIVE, Spring '18Salesforce Developers
 
Salesforce Deployment: From Production Hacker to Agile Guru
Salesforce Deployment: From Production Hacker to Agile GuruSalesforce Deployment: From Production Hacker to Agile Guru
Salesforce Deployment: From Production Hacker to Agile GuruSalesforce Developers
 
Salesforce Innovates Faster with Agile - You Can Too
Salesforce Innovates Faster with Agile - You Can TooSalesforce Innovates Faster with Agile - You Can Too
Salesforce Innovates Faster with Agile - You Can TooDreamforce
 
Dreamforce 2014 - Salesforce Python SDK for REST/SOAP APIs
Dreamforce 2014 - Salesforce Python SDK for REST/SOAP APIsDreamforce 2014 - Salesforce Python SDK for REST/SOAP APIs
Dreamforce 2014 - Salesforce Python SDK for REST/SOAP APIsHormoz Tarevern
 
Kitchener Salesforce Developer Group Event - Introduction to dev ops with Sal...
Kitchener Salesforce Developer Group Event - Introduction to dev ops with Sal...Kitchener Salesforce Developer Group Event - Introduction to dev ops with Sal...
Kitchener Salesforce Developer Group Event - Introduction to dev ops with Sal...Sudipta Deb ☁
 
Bootstrapping DX in Your Enterprise - AutoRABIT at TrailheaDX
Bootstrapping DX in Your Enterprise - AutoRABIT at TrailheaDXBootstrapping DX in Your Enterprise - AutoRABIT at TrailheaDX
Bootstrapping DX in Your Enterprise - AutoRABIT at TrailheaDXAutoRABIT
 
Salesforce Partner Forum: The Internet of Things Opportunity
Salesforce Partner Forum: The Internet of Things OpportunitySalesforce Partner Forum: The Internet of Things Opportunity
Salesforce Partner Forum: The Internet of Things OpportunityReidCarlberg
 
Build Your Lightning Rollout Plan - September 2017
Build Your Lightning Rollout Plan - September 2017Build Your Lightning Rollout Plan - September 2017
Build Your Lightning Rollout Plan - September 2017Salesforce Admins
 
Modern Architectures: How IoT will Transform and Disrupt your Industry
Modern Architectures: How IoT will Transform and Disrupt your IndustryModern Architectures: How IoT will Transform and Disrupt your Industry
Modern Architectures: How IoT will Transform and Disrupt your IndustryDreamforce
 
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSalesforce Developers
 
Detroit ELEVATE Track 1
Detroit ELEVATE Track 1Detroit ELEVATE Track 1
Detroit ELEVATE Track 1Joshua Birk
 
Build Customer Centric Applications Using the Salesforce Toolkits for .NET
Build Customer Centric Applications Using the Salesforce Toolkits for .NETBuild Customer Centric Applications Using the Salesforce Toolkits for .NET
Build Customer Centric Applications Using the Salesforce Toolkits for .NETSalesforce Developers
 
Build Customer Centric Applications Using the Salesforce Toolkits for .NET
Build Customer Centric Applications Using the Salesforce Toolkits for .NETBuild Customer Centric Applications Using the Salesforce Toolkits for .NET
Build Customer Centric Applications Using the Salesforce Toolkits for .NETSalesforce Developers
 

Similar to Live Coding with Salesforce Developers: Decoupling your org with Triggers (20)

CodeLive with Cynthia Thomas - Refactoring data dependent code.
CodeLive with Cynthia Thomas - Refactoring data dependent code.CodeLive with Cynthia Thomas - Refactoring data dependent code.
CodeLive with Cynthia Thomas - Refactoring data dependent code.
 
Live Coding with Salesforce Developers: Adding CI to Your Salesforce Project
Live Coding with Salesforce Developers: Adding CI to Your Salesforce ProjectLive Coding with Salesforce Developers: Adding CI to Your Salesforce Project
Live Coding with Salesforce Developers: Adding CI to Your Salesforce Project
 
CodeLive with Adam Daw - Building a mobile friendly geolocation aware candy t...
CodeLive with Adam Daw - Building a mobile friendly geolocation aware candy t...CodeLive with Adam Daw - Building a mobile friendly geolocation aware candy t...
CodeLive with Adam Daw - Building a mobile friendly geolocation aware candy t...
 
Code live with ryan headley code reviews done right
Code live with ryan headley   code reviews done rightCode live with ryan headley   code reviews done right
Code live with ryan headley code reviews done right
 
Salesforce Files Connect
Salesforce Files ConnectSalesforce Files Connect
Salesforce Files Connect
 
Code live with Brian Kwong - Visualforce to Lwc
Code live with Brian Kwong - Visualforce to LwcCode live with Brian Kwong - Visualforce to Lwc
Code live with Brian Kwong - Visualforce to Lwc
 
Developer Preview Live – Release Readiness LIVE, Spring '18
Developer Preview Live – Release Readiness LIVE, Spring '18Developer Preview Live – Release Readiness LIVE, Spring '18
Developer Preview Live – Release Readiness LIVE, Spring '18
 
Salesforce Deployment: From Production Hacker to Agile Guru
Salesforce Deployment: From Production Hacker to Agile GuruSalesforce Deployment: From Production Hacker to Agile Guru
Salesforce Deployment: From Production Hacker to Agile Guru
 
Salesforce Innovates Faster with Agile - You Can Too
Salesforce Innovates Faster with Agile - You Can TooSalesforce Innovates Faster with Agile - You Can Too
Salesforce Innovates Faster with Agile - You Can Too
 
Dreamforce 2014 - Salesforce Python SDK for REST/SOAP APIs
Dreamforce 2014 - Salesforce Python SDK for REST/SOAP APIsDreamforce 2014 - Salesforce Python SDK for REST/SOAP APIs
Dreamforce 2014 - Salesforce Python SDK for REST/SOAP APIs
 
Kitchener Salesforce Developer Group Event - Introduction to dev ops with Sal...
Kitchener Salesforce Developer Group Event - Introduction to dev ops with Sal...Kitchener Salesforce Developer Group Event - Introduction to dev ops with Sal...
Kitchener Salesforce Developer Group Event - Introduction to dev ops with Sal...
 
Introduction to Apex Triggers
Introduction to Apex TriggersIntroduction to Apex Triggers
Introduction to Apex Triggers
 
Bootstrapping DX in Your Enterprise - AutoRABIT at TrailheaDX
Bootstrapping DX in Your Enterprise - AutoRABIT at TrailheaDXBootstrapping DX in Your Enterprise - AutoRABIT at TrailheaDX
Bootstrapping DX in Your Enterprise - AutoRABIT at TrailheaDX
 
Salesforce Partner Forum: The Internet of Things Opportunity
Salesforce Partner Forum: The Internet of Things OpportunitySalesforce Partner Forum: The Internet of Things Opportunity
Salesforce Partner Forum: The Internet of Things Opportunity
 
Build Your Lightning Rollout Plan - September 2017
Build Your Lightning Rollout Plan - September 2017Build Your Lightning Rollout Plan - September 2017
Build Your Lightning Rollout Plan - September 2017
 
Modern Architectures: How IoT will Transform and Disrupt your Industry
Modern Architectures: How IoT will Transform and Disrupt your IndustryModern Architectures: How IoT will Transform and Disrupt your Industry
Modern Architectures: How IoT will Transform and Disrupt your Industry
 
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
 
Detroit ELEVATE Track 1
Detroit ELEVATE Track 1Detroit ELEVATE Track 1
Detroit ELEVATE Track 1
 
Build Customer Centric Applications Using the Salesforce Toolkits for .NET
Build Customer Centric Applications Using the Salesforce Toolkits for .NETBuild Customer Centric Applications Using the Salesforce Toolkits for .NET
Build Customer Centric Applications Using the Salesforce Toolkits for .NET
 
Build Customer Centric Applications Using the Salesforce Toolkits for .NET
Build Customer Centric Applications Using the Salesforce Toolkits for .NETBuild Customer Centric Applications Using the Salesforce Toolkits for .NET
Build Customer Centric Applications Using the Salesforce Toolkits for .NET
 

More from Developer Force

Developing Trusted Networks with Salesforce Blockchain
Developing Trusted Networks with Salesforce BlockchainDeveloping Trusted Networks with Salesforce Blockchain
Developing Trusted Networks with Salesforce BlockchainDeveloper Force
 
Preview: Local Development for Lightning Web Components
Preview: Local Development for Lightning Web ComponentsPreview: Local Development for Lightning Web Components
Preview: Local Development for Lightning Web ComponentsDeveloper Force
 
Integrate with MuleSoft Anypoint
Integrate with MuleSoft AnypointIntegrate with MuleSoft Anypoint
Integrate with MuleSoft AnypointDeveloper Force
 
Get Started with the Lightning Platform
Get Started with the Lightning PlatformGet Started with the Lightning Platform
Get Started with the Lightning PlatformDeveloper Force
 
Meet Astro & Friends with Domenique Sillett-Buxton
Meet Astro & Friends with Domenique Sillett-BuxtonMeet Astro & Friends with Domenique Sillett-Buxton
Meet Astro & Friends with Domenique Sillett-BuxtonDeveloper Force
 
Salesforce Lightning Supersession (TDX18)
Salesforce Lightning Supersession (TDX18)Salesforce Lightning Supersession (TDX18)
Salesforce Lightning Supersession (TDX18)Developer Force
 
Salesforce Lightning Customization Roadmap (TDX18)
Salesforce Lightning Customization Roadmap (TDX18)Salesforce Lightning Customization Roadmap (TDX18)
Salesforce Lightning Customization Roadmap (TDX18)Developer Force
 
Salesforce Lightning Component Framework Roadmap (TDX18)
Salesforce Lightning Component Framework Roadmap (TDX18)Salesforce Lightning Component Framework Roadmap (TDX18)
Salesforce Lightning Component Framework Roadmap (TDX18)Developer Force
 

More from Developer Force (8)

Developing Trusted Networks with Salesforce Blockchain
Developing Trusted Networks with Salesforce BlockchainDeveloping Trusted Networks with Salesforce Blockchain
Developing Trusted Networks with Salesforce Blockchain
 
Preview: Local Development for Lightning Web Components
Preview: Local Development for Lightning Web ComponentsPreview: Local Development for Lightning Web Components
Preview: Local Development for Lightning Web Components
 
Integrate with MuleSoft Anypoint
Integrate with MuleSoft AnypointIntegrate with MuleSoft Anypoint
Integrate with MuleSoft Anypoint
 
Get Started with the Lightning Platform
Get Started with the Lightning PlatformGet Started with the Lightning Platform
Get Started with the Lightning Platform
 
Meet Astro & Friends with Domenique Sillett-Buxton
Meet Astro & Friends with Domenique Sillett-BuxtonMeet Astro & Friends with Domenique Sillett-Buxton
Meet Astro & Friends with Domenique Sillett-Buxton
 
Salesforce Lightning Supersession (TDX18)
Salesforce Lightning Supersession (TDX18)Salesforce Lightning Supersession (TDX18)
Salesforce Lightning Supersession (TDX18)
 
Salesforce Lightning Customization Roadmap (TDX18)
Salesforce Lightning Customization Roadmap (TDX18)Salesforce Lightning Customization Roadmap (TDX18)
Salesforce Lightning Customization Roadmap (TDX18)
 
Salesforce Lightning Component Framework Roadmap (TDX18)
Salesforce Lightning Component Framework Roadmap (TDX18)Salesforce Lightning Component Framework Roadmap (TDX18)
Salesforce Lightning Component Framework Roadmap (TDX18)
 

Recently uploaded

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 

Recently uploaded (20)

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 

Live Coding with Salesforce Developers: Decoupling your org with Triggers

  • 1. Live Coding with Salesforce Developers July 31, 2019 Decoupling Triggers with Kevin Poorman & Simon Goodyear
  • 2. Simon Goodyear Developer Evangelist, Salesforce.com Knows a guy who tried to import Jars from Static Resources Live Coding with Simon Goodyear & Kevin Poorman Kevin Poorman @codefriar Head of Salesforce, Oodle Car Finance Favorite Song: Careless Whisper
  • 3. Introductions FLS, not just for field level security anymore Explanation of the problem Coding our solution Recap Talking about what we’re gonna talk about. #meta Today’s Agenda
  • 4. This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Website. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements. Statement under the Private Securities Litigation Reform Act of 1995 Forward-Looking Statement
  • 5. If only because it shows you all how tightly coupled everything is! Packaging is the bee’s knees
  • 6. Decoupling Triggers Trigger Best Practice says: One Trigger Per Object! Logic in handler classes. Allows for controlled order of operation. But keeping order?
  • 7. If two packages both contain triggers on the same object how do you Not create a dependency between the two packages? Which package gets the actual trigger?. Maintain the best practice of a single trigger per object? What if two packages have a trigger on the same object? The Packaging Problem
  • 8. Goals: Keep to one trigger per object. Enable independent package updates. Provide an elegant framework for Triggers. We’ll use: A trigger framework Custom Metadata Meta progamming Our solution. Decoupling for the win.
  • 10. This way to the code In case Kevin forgets, this is where we (finally) get away from the slides and to the coding bits.
  • 11. Today we Learned how to use a trigger framework to Decouple trigger execution from logic. Prevent cross-package dependencies. Use Custom Metadata, along with Meta Programming to dynamically instantiate classes Made GLORIOUS typos.
  • 12. Key Takeaways Packaging is the way to go but it can take some work to break a large org up into packages. Triggers are often especially hard to break up, because best practice has always been to have a single trigger per object! Custom metadata can help you dynamically define what logic is run, and when Meta programming can help you convert strings, into instances of classes! Remember this!
  • 13. Complete the CI Trailmix: https://sforce.co/2GF86ds trailhead.salesforce.com
  • 14. Q & A Try Trailhead: trailhead.salesforce.com Join the conversation: @salesforcedevs