SlideShare a Scribd company logo
Fun with Generic SObjects
​ Evan Kennedy
​ Senior Salesforce Developer/Technical Architect
​ evan@modacto.com
Writing code to work against any Salesforce object.
Evan Kennedy
Senior Salesforce Developer/Technical Architect
About Modacto
​ Implementation and optimization of the Salesforce platform for growth-minded
organizations.
•  Improvements
•  Meaningful
business value
•  Effective support
of Salesforce
ecosystem
•  Cleansing,
migration,
integration
•  Reporting and
dashboards
•  Lightning connect
•  Wave
​ Ready to go
Modacto?
​ 800 Washington Ave
N
Suite 907
Minneapolis, MN
55401
​ 612.200.0846
info@modacto.com
•  Going beyond
configuration
•  Customized app
builds
•  Comfortable
adoption
Overview of Topic
​ We all like to write re-usable code, one of the ways to do this is to use Generic
SObjects in our Apex classes.
​  Some code examples
•  Schema Describe Code
•  Multi-Object Trigger Handlers
•  Apex REST endpoint for generic SObjects
•  Crud Enforcement
​  A couple of real-world case studies
​  Pros and common pitfalls of generic SObjects
Code Examples
Let’s just jump right in, shall we?
Example 1
Using the Schema Describe Code, Dynamic SOQL
Schema Describe Code and Dynamic SOQL
​ This example will cover:
•  Using the Schema describe code to get object and field information in Apex.
•  Using this information to construct dynamic SOQL queries.
Example 2
Multi-Object Trigger Handlers
​ In this example we’re going to look at:
•  Writing simple trigger handler code to handle multiple types of objects
•  Retrieving field data from a generic SObject.
Multi-Object Trigger Handlers
Example 3
Apex REST Endpoint for Lists of Generic SObjects
​ Useful when needing to implement additional endpoint logic across many objects.
​ Good for Salesforce to Salesforce types of custom integrations.
Apex REST Endpoint for Generic SObjects
Example 4
Small examples: Crud Enforcement and Object Sorting
​ Required for AppExchange security review
​ Good way to enforce profile/permission set object and field-level security.
​ Existing Package for this: https://github.com/ZergyPoo/SFDCCrudEnforcementUtils
Crud Enforcement
​ Custom SObject Sorting where SOQL falls short.
​ Good for fields that contain numbers and text.
SObject Sorting
Real-World Case Studies
PromotionBuilder and Solomon365
​ PromotionBuilder
•  Gamification app
•  Allows users to setup custom criteria against any
of their objects
•  Runs the same trigger code against the objects to
check for gamification criteria.
​ Solomon365
•  Hub and Spoke model
•  Data syncing back from the spokes to the hub
organization
•  Needed custom Apex REST endpoints to handle
multiple types of objects with complex logic
without having to duplicate code.
Cool Real-World Examples
The Good and the Bad
Pros and Common Pitfalls of using Generic SObjects
​ Pros – What is great about using generic
SObjects
•  Lots of re-usable code
•  Covering common functionality without have to
copy and paste all the time
•  Great for apps, lets your clients run your code
against their own custom objects
•  Dynamic SOQL
​ Cons – The ugly
•  Much more prone to run-time error
•  Can be more confusing to read the code
•  Object instantiation can get a little wonky
Pros and Cons
It’s a Wrap!
​ Pros and Cons of using generic SObjects in Apex code.
​ Some awesome code examples
​ Some Real-world applications
What did we cover?
Wrap-Up
Any Questions?
​ Feel free to ask me anything (within reason)
Thank you

More Related Content

What's hot

Salesforce Consulting Services
Salesforce Consulting ServicesSalesforce Consulting Services
Salesforce Consulting Services
Manasa Nuguri
 
Coding Apps in the Cloud with Force.com - Part 2
Coding Apps in the Cloud with Force.com - Part 2Coding Apps in the Cloud with Force.com - Part 2
Coding Apps in the Cloud with Force.com - Part 2
Salesforce Developers
 
Integrating Salesforce with Microsoft Office through Add-ins
Integrating Salesforce with Microsoft Office through Add-insIntegrating Salesforce with Microsoft Office through Add-ins
Integrating Salesforce with Microsoft Office through Add-ins
Salesforce Developers
 
How Salesforce.com R&D Delivers the Cloud
How Salesforce.com R&D Delivers the CloudHow Salesforce.com R&D Delivers the Cloud
How Salesforce.com R&D Delivers the Cloud
Salesforce Developers
 
App to AppExchange - A Journey from Idea to Market for Salesforce Developers
App to AppExchange - A Journey from Idea to Market for Salesforce DevelopersApp to AppExchange - A Journey from Idea to Market for Salesforce Developers
App to AppExchange - A Journey from Idea to Market for Salesforce Developers
Eric Shupps
 
Building BOTS on App Cloud
Building BOTS on App CloudBuilding BOTS on App Cloud
Building BOTS on App Cloud
Salesforce Developers
 
Let's Learn About Heroku and How to Integrate with Salesforce
Let's Learn About Heroku and How to Integrate with SalesforceLet's Learn About Heroku and How to Integrate with Salesforce
Let's Learn About Heroku and How to Integrate with Salesforce
Sudipta Deb ☁
 
Salesforce DX Pilot Product Overview
Salesforce DX Pilot Product OverviewSalesforce DX Pilot Product Overview
Salesforce DX Pilot Product Overview
Salesforce Partners
 
How Salesforce.com R&D Delivers the Cloud
How Salesforce.com R&D Delivers the CloudHow Salesforce.com R&D Delivers the Cloud
How Salesforce.com R&D Delivers the Cloud
Salesforce Developers
 
Salesforce integration best practices columbus meetup
Salesforce integration best practices   columbus meetupSalesforce integration best practices   columbus meetup
Salesforce integration best practices columbus meetup
MuleSoft Meetup
 
Enterprise Integration - Solution Patterns From the Field
Enterprise Integration - Solution Patterns From the FieldEnterprise Integration - Solution Patterns From the Field
Enterprise Integration - Solution Patterns From the Field
Salesforce Developers
 
Utilize Heroku to Push Google Analytics Data into Analytics Cloud
Utilize Heroku to Push Google Analytics Data into Analytics CloudUtilize Heroku to Push Google Analytics Data into Analytics Cloud
Utilize Heroku to Push Google Analytics Data into Analytics Cloud
Salesforce Developers
 
Introduction to MuleSoft
Introduction to MuleSoftIntroduction to MuleSoft
Introduction to MuleSoft
Salesforce Developers
 
Beyond Custom Metadata Types
Beyond Custom Metadata TypesBeyond Custom Metadata Types
Beyond Custom Metadata Types
Salesforce Developers
 
Manage Massive Datasets with Big Objects & Async SOQL
Manage Massive Datasets with  Big Objects & Async SOQLManage Massive Datasets with  Big Objects & Async SOQL
Manage Massive Datasets with Big Objects & Async SOQL
Salesforce Developers
 
Integrating SIS’s with Salesforce: An Accidental Integrator’s Guide
Integrating SIS’s with Salesforce: An Accidental Integrator’s GuideIntegrating SIS’s with Salesforce: An Accidental Integrator’s Guide
Integrating SIS’s with Salesforce: An Accidental Integrator’s Guide
Salesforce.org
 
Manage Development in Your Org with Salesforce Governance Framework
Manage Development in Your Org with Salesforce Governance FrameworkManage Development in Your Org with Salesforce Governance Framework
Manage Development in Your Org with Salesforce Governance Framework
Salesforce Developers
 
UX and Design: Top Tips for Salesforce Apps on Mobile and Wearables
UX and Design: Top Tips for Salesforce Apps on Mobile and WearablesUX and Design: Top Tips for Salesforce Apps on Mobile and Wearables
UX and Design: Top Tips for Salesforce Apps on Mobile and Wearables
Salesforce Developers
 
The Importance of Integration to Salesforce Success
The Importance of Integration to Salesforce SuccessThe Importance of Integration to Salesforce Success
The Importance of Integration to Salesforce Success
Darren Cunningham
 
Two-Way Integration with Writable External Objects
Two-Way Integration with Writable External ObjectsTwo-Way Integration with Writable External Objects
Two-Way Integration with Writable External Objects
Salesforce Developers
 

What's hot (20)

Salesforce Consulting Services
Salesforce Consulting ServicesSalesforce Consulting Services
Salesforce Consulting Services
 
Coding Apps in the Cloud with Force.com - Part 2
Coding Apps in the Cloud with Force.com - Part 2Coding Apps in the Cloud with Force.com - Part 2
Coding Apps in the Cloud with Force.com - Part 2
 
Integrating Salesforce with Microsoft Office through Add-ins
Integrating Salesforce with Microsoft Office through Add-insIntegrating Salesforce with Microsoft Office through Add-ins
Integrating Salesforce with Microsoft Office through Add-ins
 
How Salesforce.com R&D Delivers the Cloud
How Salesforce.com R&D Delivers the CloudHow Salesforce.com R&D Delivers the Cloud
How Salesforce.com R&D Delivers the Cloud
 
App to AppExchange - A Journey from Idea to Market for Salesforce Developers
App to AppExchange - A Journey from Idea to Market for Salesforce DevelopersApp to AppExchange - A Journey from Idea to Market for Salesforce Developers
App to AppExchange - A Journey from Idea to Market for Salesforce Developers
 
Building BOTS on App Cloud
Building BOTS on App CloudBuilding BOTS on App Cloud
Building BOTS on App Cloud
 
Let's Learn About Heroku and How to Integrate with Salesforce
Let's Learn About Heroku and How to Integrate with SalesforceLet's Learn About Heroku and How to Integrate with Salesforce
Let's Learn About Heroku and How to Integrate with Salesforce
 
Salesforce DX Pilot Product Overview
Salesforce DX Pilot Product OverviewSalesforce DX Pilot Product Overview
Salesforce DX Pilot Product Overview
 
How Salesforce.com R&D Delivers the Cloud
How Salesforce.com R&D Delivers the CloudHow Salesforce.com R&D Delivers the Cloud
How Salesforce.com R&D Delivers the Cloud
 
Salesforce integration best practices columbus meetup
Salesforce integration best practices   columbus meetupSalesforce integration best practices   columbus meetup
Salesforce integration best practices columbus meetup
 
Enterprise Integration - Solution Patterns From the Field
Enterprise Integration - Solution Patterns From the FieldEnterprise Integration - Solution Patterns From the Field
Enterprise Integration - Solution Patterns From the Field
 
Utilize Heroku to Push Google Analytics Data into Analytics Cloud
Utilize Heroku to Push Google Analytics Data into Analytics CloudUtilize Heroku to Push Google Analytics Data into Analytics Cloud
Utilize Heroku to Push Google Analytics Data into Analytics Cloud
 
Introduction to MuleSoft
Introduction to MuleSoftIntroduction to MuleSoft
Introduction to MuleSoft
 
Beyond Custom Metadata Types
Beyond Custom Metadata TypesBeyond Custom Metadata Types
Beyond Custom Metadata Types
 
Manage Massive Datasets with Big Objects & Async SOQL
Manage Massive Datasets with  Big Objects & Async SOQLManage Massive Datasets with  Big Objects & Async SOQL
Manage Massive Datasets with Big Objects & Async SOQL
 
Integrating SIS’s with Salesforce: An Accidental Integrator’s Guide
Integrating SIS’s with Salesforce: An Accidental Integrator’s GuideIntegrating SIS’s with Salesforce: An Accidental Integrator’s Guide
Integrating SIS’s with Salesforce: An Accidental Integrator’s Guide
 
Manage Development in Your Org with Salesforce Governance Framework
Manage Development in Your Org with Salesforce Governance FrameworkManage Development in Your Org with Salesforce Governance Framework
Manage Development in Your Org with Salesforce Governance Framework
 
UX and Design: Top Tips for Salesforce Apps on Mobile and Wearables
UX and Design: Top Tips for Salesforce Apps on Mobile and WearablesUX and Design: Top Tips for Salesforce Apps on Mobile and Wearables
UX and Design: Top Tips for Salesforce Apps on Mobile and Wearables
 
The Importance of Integration to Salesforce Success
The Importance of Integration to Salesforce SuccessThe Importance of Integration to Salesforce Success
The Importance of Integration to Salesforce Success
 
Two-Way Integration with Writable External Objects
Two-Way Integration with Writable External ObjectsTwo-Way Integration with Writable External Objects
Two-Way Integration with Writable External Objects
 

Viewers also liked

Confessions of a Technical Writer
Confessions of a Technical WriterConfessions of a Technical Writer
Confessions of a Technical Writer
Lana Brindley
 
Erin Vang - Rockstars, not typists! Expanding your influence in tech organiza...
Erin Vang - Rockstars, not typists! Expanding your influence in tech organiza...Erin Vang - Rockstars, not typists! Expanding your influence in tech organiza...
Erin Vang - Rockstars, not typists! Expanding your influence in tech organiza...
soapconf
 
No Boring Content Allowed!
No Boring Content Allowed!No Boring Content Allowed!
No Boring Content Allowed!
Steph Hay
 
Judges training m wright food and nutrition 2013
Judges training m wright food and nutrition 2013Judges training m wright food and nutrition 2013
Judges training m wright food and nutrition 2013
Iowa State University Extension 4-H
 
GetBadges - gamification platform for software developers
GetBadges - gamification platform for software developersGetBadges - gamification platform for software developers
GetBadges - gamification platform for software developers
Justyna Wojtczak
 
What every teacher should know about cognitive science
What every teacher should know about cognitive scienceWhat every teacher should know about cognitive science
What every teacher should know about cognitive science
Stephanie Chasteen
 
Portfolio2
Portfolio2Portfolio2
MAGIC of the twitisphere.... Making the writing programme fun
MAGIC of the twitisphere.... Making the writing programme funMAGIC of the twitisphere.... Making the writing programme fun
MAGIC of the twitisphere.... Making the writing programme fun
Craig Hansen
 
Village workshop - Tech Ideas to Make Writing Fun
Village workshop - Tech Ideas to Make Writing FunVillage workshop - Tech Ideas to Make Writing Fun
Village workshop - Tech Ideas to Make Writing Fun
cmacconnell
 
ADVERGAME, quand la marque se met au jeu
ADVERGAME, quand la marque se met au jeuADVERGAME, quand la marque se met au jeu
ADVERGAME, quand la marque se met au jeu
Vincent PUREN
 
How Cognitive Science Can Help You Through School
How Cognitive Science Can Help You Through SchoolHow Cognitive Science Can Help You Through School
How Cognitive Science Can Help You Through School
Jim Davies
 
Gamification: Make Freelance Writing More Fun
Gamification: Make Freelance Writing More FunGamification: Make Freelance Writing More Fun
Gamification: Make Freelance Writing More Fun
Jennifer Mattern
 
Monika Konieczny - Gamification & storytelling: how to turn boring technical ...
Monika Konieczny - Gamification & storytelling: how to turn boring technical ...Monika Konieczny - Gamification & storytelling: how to turn boring technical ...
Monika Konieczny - Gamification & storytelling: how to turn boring technical ...
soapconf
 
Communication with Flexible Documentation : Jon Hadden
Communication with Flexible Documentation : Jon HaddenCommunication with Flexible Documentation : Jon Hadden
Communication with Flexible Documentation : Jon Hadden
Nomensa
 
Present day english
Present day englishPresent day english
Present day english
dagdag
 
This is Your Brain on Content: Cognitive Science Lessons for Content Strategy
This is Your Brain on Content: Cognitive Science Lessons for Content StrategyThis is Your Brain on Content: Cognitive Science Lessons for Content Strategy
This is Your Brain on Content: Cognitive Science Lessons for Content Strategy
Noz Urbina
 
Fun at work through innovation games
Fun at work through innovation gamesFun at work through innovation games
Fun at work through innovation games
Srinath Ramakrishnan
 
12 Secrets of Making Every Presentation Fun, Engaging and Enjoyable
12 Secrets of Making Every Presentation Fun, Engaging and Enjoyable12 Secrets of Making Every Presentation Fun, Engaging and Enjoyable
12 Secrets of Making Every Presentation Fun, Engaging and Enjoyable
SketchBubble
 
Qualities of good technical writing with examples
Qualities of good technical writing with examplesQualities of good technical writing with examples
Qualities of good technical writing with examples
muhammad ilyas
 
Technical Writing
Technical WritingTechnical Writing
Technical Writing
maria martha manette madrid
 

Viewers also liked (20)

Confessions of a Technical Writer
Confessions of a Technical WriterConfessions of a Technical Writer
Confessions of a Technical Writer
 
Erin Vang - Rockstars, not typists! Expanding your influence in tech organiza...
Erin Vang - Rockstars, not typists! Expanding your influence in tech organiza...Erin Vang - Rockstars, not typists! Expanding your influence in tech organiza...
Erin Vang - Rockstars, not typists! Expanding your influence in tech organiza...
 
No Boring Content Allowed!
No Boring Content Allowed!No Boring Content Allowed!
No Boring Content Allowed!
 
Judges training m wright food and nutrition 2013
Judges training m wright food and nutrition 2013Judges training m wright food and nutrition 2013
Judges training m wright food and nutrition 2013
 
GetBadges - gamification platform for software developers
GetBadges - gamification platform for software developersGetBadges - gamification platform for software developers
GetBadges - gamification platform for software developers
 
What every teacher should know about cognitive science
What every teacher should know about cognitive scienceWhat every teacher should know about cognitive science
What every teacher should know about cognitive science
 
Portfolio2
Portfolio2Portfolio2
Portfolio2
 
MAGIC of the twitisphere.... Making the writing programme fun
MAGIC of the twitisphere.... Making the writing programme funMAGIC of the twitisphere.... Making the writing programme fun
MAGIC of the twitisphere.... Making the writing programme fun
 
Village workshop - Tech Ideas to Make Writing Fun
Village workshop - Tech Ideas to Make Writing FunVillage workshop - Tech Ideas to Make Writing Fun
Village workshop - Tech Ideas to Make Writing Fun
 
ADVERGAME, quand la marque se met au jeu
ADVERGAME, quand la marque se met au jeuADVERGAME, quand la marque se met au jeu
ADVERGAME, quand la marque se met au jeu
 
How Cognitive Science Can Help You Through School
How Cognitive Science Can Help You Through SchoolHow Cognitive Science Can Help You Through School
How Cognitive Science Can Help You Through School
 
Gamification: Make Freelance Writing More Fun
Gamification: Make Freelance Writing More FunGamification: Make Freelance Writing More Fun
Gamification: Make Freelance Writing More Fun
 
Monika Konieczny - Gamification & storytelling: how to turn boring technical ...
Monika Konieczny - Gamification & storytelling: how to turn boring technical ...Monika Konieczny - Gamification & storytelling: how to turn boring technical ...
Monika Konieczny - Gamification & storytelling: how to turn boring technical ...
 
Communication with Flexible Documentation : Jon Hadden
Communication with Flexible Documentation : Jon HaddenCommunication with Flexible Documentation : Jon Hadden
Communication with Flexible Documentation : Jon Hadden
 
Present day english
Present day englishPresent day english
Present day english
 
This is Your Brain on Content: Cognitive Science Lessons for Content Strategy
This is Your Brain on Content: Cognitive Science Lessons for Content StrategyThis is Your Brain on Content: Cognitive Science Lessons for Content Strategy
This is Your Brain on Content: Cognitive Science Lessons for Content Strategy
 
Fun at work through innovation games
Fun at work through innovation gamesFun at work through innovation games
Fun at work through innovation games
 
12 Secrets of Making Every Presentation Fun, Engaging and Enjoyable
12 Secrets of Making Every Presentation Fun, Engaging and Enjoyable12 Secrets of Making Every Presentation Fun, Engaging and Enjoyable
12 Secrets of Making Every Presentation Fun, Engaging and Enjoyable
 
Qualities of good technical writing with examples
Qualities of good technical writing with examplesQualities of good technical writing with examples
Qualities of good technical writing with examples
 
Technical Writing
Technical WritingTechnical Writing
Technical Writing
 

Similar to Writing Code to Work Against any Salesforce Object

Polaris presentation ioc - code conference
Polaris presentation   ioc - code conferencePolaris presentation   ioc - code conference
Polaris presentation ioc - code conference
Steven Contos
 
Sitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixSitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helix
Peter Nazarov
 
jForce In Action
jForce In ActionjForce In Action
jForce In Action
Gordon Bockus
 
IBM Developer Model Asset eXchange - Deep Learning for Everyone
IBM Developer Model Asset eXchange - Deep Learning for EveryoneIBM Developer Model Asset eXchange - Deep Learning for Everyone
IBM Developer Model Asset eXchange - Deep Learning for Everyone
Nick Pentreath
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms Bootcamp
Mike Melusky
 
Mobx Internals
Mobx InternalsMobx Internals
Mobx Internals
500Tech
 
NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET
Dmytro Mindra
 
Subhasis Java Resume
Subhasis Java ResumeSubhasis Java Resume
Subhasis Java Resume
subhasis panda
 
What Web Framework To Use?
What Web Framework To Use?What Web Framework To Use?
What Web Framework To Use?
Kasra Khosravi
 
Punta Dreamin 17 Generic Apex and Tooling Api
Punta Dreamin 17 Generic Apex and Tooling ApiPunta Dreamin 17 Generic Apex and Tooling Api
Punta Dreamin 17 Generic Apex and Tooling Api
Adam Olshansky
 
Fed London - January 2015
Fed London - January 2015Fed London - January 2015
Fed London - January 2015
Phil Leggetter
 
Apex Enterprise Patterns Galore - Boston, MA dev group meeting 062719
Apex Enterprise Patterns Galore - Boston, MA dev group meeting 062719Apex Enterprise Patterns Galore - Boston, MA dev group meeting 062719
Apex Enterprise Patterns Galore - Boston, MA dev group meeting 062719
BingWang77
 
Pluggable patterns
Pluggable patternsPluggable patterns
Pluggable patterns
Corey Oordt
 
SDWest2005Goetsch
SDWest2005GoetschSDWest2005Goetsch
SDWest2005Goetsch
Mark Goetsch
 
Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)
Roy Gilad
 
springtraning-7024840-phpapp01.pdf
springtraning-7024840-phpapp01.pdfspringtraning-7024840-phpapp01.pdf
springtraning-7024840-phpapp01.pdf
BruceLee275640
 
Recurrent Neural Network : Multi-Class & Multi Label Text Classification
Recurrent Neural Network : Multi-Class & Multi Label Text ClassificationRecurrent Neural Network : Multi-Class & Multi Label Text Classification
Recurrent Neural Network : Multi-Class & Multi Label Text Classification
Amit Agarwal
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
Amazon Web Services
 
Click, Click, Test - Automated Tests for APEX Applications
Click, Click, Test - Automated Tests for APEX ApplicationsClick, Click, Test - Automated Tests for APEX Applications
Click, Click, Test - Automated Tests for APEX Applications
Kai Donato
 
selenium_course_content.pdf
selenium_course_content.pdfselenium_course_content.pdf
selenium_course_content.pdf
aswinisowmiya
 

Similar to Writing Code to Work Against any Salesforce Object (20)

Polaris presentation ioc - code conference
Polaris presentation   ioc - code conferencePolaris presentation   ioc - code conference
Polaris presentation ioc - code conference
 
Sitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixSitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helix
 
jForce In Action
jForce In ActionjForce In Action
jForce In Action
 
IBM Developer Model Asset eXchange - Deep Learning for Everyone
IBM Developer Model Asset eXchange - Deep Learning for EveryoneIBM Developer Model Asset eXchange - Deep Learning for Everyone
IBM Developer Model Asset eXchange - Deep Learning for Everyone
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms Bootcamp
 
Mobx Internals
Mobx InternalsMobx Internals
Mobx Internals
 
NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET
 
Subhasis Java Resume
Subhasis Java ResumeSubhasis Java Resume
Subhasis Java Resume
 
What Web Framework To Use?
What Web Framework To Use?What Web Framework To Use?
What Web Framework To Use?
 
Punta Dreamin 17 Generic Apex and Tooling Api
Punta Dreamin 17 Generic Apex and Tooling ApiPunta Dreamin 17 Generic Apex and Tooling Api
Punta Dreamin 17 Generic Apex and Tooling Api
 
Fed London - January 2015
Fed London - January 2015Fed London - January 2015
Fed London - January 2015
 
Apex Enterprise Patterns Galore - Boston, MA dev group meeting 062719
Apex Enterprise Patterns Galore - Boston, MA dev group meeting 062719Apex Enterprise Patterns Galore - Boston, MA dev group meeting 062719
Apex Enterprise Patterns Galore - Boston, MA dev group meeting 062719
 
Pluggable patterns
Pluggable patternsPluggable patterns
Pluggable patterns
 
SDWest2005Goetsch
SDWest2005GoetschSDWest2005Goetsch
SDWest2005Goetsch
 
Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)
 
springtraning-7024840-phpapp01.pdf
springtraning-7024840-phpapp01.pdfspringtraning-7024840-phpapp01.pdf
springtraning-7024840-phpapp01.pdf
 
Recurrent Neural Network : Multi-Class & Multi Label Text Classification
Recurrent Neural Network : Multi-Class & Multi Label Text ClassificationRecurrent Neural Network : Multi-Class & Multi Label Text Classification
Recurrent Neural Network : Multi-Class & Multi Label Text Classification
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Click, Click, Test - Automated Tests for APEX Applications
Click, Click, Test - Automated Tests for APEX ApplicationsClick, Click, Test - Automated Tests for APEX Applications
Click, Click, Test - Automated Tests for APEX Applications
 
selenium_course_content.pdf
selenium_course_content.pdfselenium_course_content.pdf
selenium_course_content.pdf
 

More from Salesforce Developers

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
Salesforce Developers
 
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceMaximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Salesforce Developers
 
Local development with Open Source Base Components
Local development with Open Source Base ComponentsLocal development with Open Source Base Components
Local development with Open Source Base Components
Salesforce Developers
 
TrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsTrailheaDX India : Developer Highlights
TrailheaDX India : Developer Highlights
Salesforce Developers
 
Why developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaWhy developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX India
Salesforce Developers
 
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentCodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local Development
Salesforce Developers
 
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
Salesforce Developers
 
Enterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsEnterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web Components
Salesforce Developers
 
TrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsTrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer Highlights
Salesforce Developers
 
Live coding with LWC
Live coding with LWCLive coding with LWC
Live coding with LWC
Salesforce Developers
 
Lightning web components - Episode 4 : Security and Testing
Lightning web components  - Episode 4 : Security and TestingLightning web components  - Episode 4 : Security and Testing
Lightning web components - Episode 4 : Security and Testing
Salesforce Developers
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura Interoperability
Salesforce Developers
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce data
Salesforce Developers
 
Lightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionLightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An Introduction
Salesforce Developers
 
Migrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPMigrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCP
Salesforce Developers
 
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
Salesforce Developers
 
Replicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureReplicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data Capture
Salesforce Developers
 
Modern Development with Salesforce DX
Modern Development with Salesforce DXModern Development with Salesforce DX
Modern Development with Salesforce DX
Salesforce Developers
 
Get Into Lightning Flow Development
Get Into Lightning Flow DevelopmentGet Into Lightning Flow Development
Get Into Lightning Flow Development
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 Connect
Salesforce Developers
 

More from Salesforce Developers (20)

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
 
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceMaximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component Performance
 
Local development with Open Source Base Components
Local development with Open Source Base ComponentsLocal development with Open Source Base Components
Local development with Open Source Base Components
 
TrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsTrailheaDX India : Developer Highlights
TrailheaDX India : Developer Highlights
 
Why developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaWhy developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX India
 
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentCodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local Development
 
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
 
Enterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsEnterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web Components
 
TrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsTrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer Highlights
 
Live coding with LWC
Live coding with LWCLive coding with LWC
Live coding with LWC
 
Lightning web components - Episode 4 : Security and Testing
Lightning web components  - Episode 4 : Security and TestingLightning web components  - Episode 4 : Security and Testing
Lightning web components - Episode 4 : Security and Testing
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura Interoperability
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce data
 
Lightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionLightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An Introduction
 
Migrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPMigrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCP
 
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
 
Replicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureReplicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data Capture
 
Modern Development with Salesforce DX
Modern Development with Salesforce DXModern Development with Salesforce DX
Modern Development with Salesforce DX
 
Get Into Lightning Flow Development
Get Into Lightning Flow DevelopmentGet Into Lightning Flow Development
Get Into Lightning Flow Development
 
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
 

Recently uploaded

Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 

Recently uploaded (20)

Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 

Writing Code to Work Against any Salesforce Object

  • 1. Fun with Generic SObjects ​ Evan Kennedy ​ Senior Salesforce Developer/Technical Architect ​ evan@modacto.com Writing code to work against any Salesforce object.
  • 2. Evan Kennedy Senior Salesforce Developer/Technical Architect
  • 3. About Modacto ​ Implementation and optimization of the Salesforce platform for growth-minded organizations. •  Improvements •  Meaningful business value •  Effective support of Salesforce ecosystem •  Cleansing, migration, integration •  Reporting and dashboards •  Lightning connect •  Wave ​ Ready to go Modacto? ​ 800 Washington Ave N Suite 907 Minneapolis, MN 55401 ​ 612.200.0846 info@modacto.com •  Going beyond configuration •  Customized app builds •  Comfortable adoption
  • 4. Overview of Topic ​ We all like to write re-usable code, one of the ways to do this is to use Generic SObjects in our Apex classes. ​  Some code examples •  Schema Describe Code •  Multi-Object Trigger Handlers •  Apex REST endpoint for generic SObjects •  Crud Enforcement ​  A couple of real-world case studies ​  Pros and common pitfalls of generic SObjects
  • 5. Code Examples Let’s just jump right in, shall we?
  • 6. Example 1 Using the Schema Describe Code, Dynamic SOQL
  • 7. Schema Describe Code and Dynamic SOQL ​ This example will cover: •  Using the Schema describe code to get object and field information in Apex. •  Using this information to construct dynamic SOQL queries.
  • 9. ​ In this example we’re going to look at: •  Writing simple trigger handler code to handle multiple types of objects •  Retrieving field data from a generic SObject. Multi-Object Trigger Handlers
  • 10. Example 3 Apex REST Endpoint for Lists of Generic SObjects
  • 11. ​ Useful when needing to implement additional endpoint logic across many objects. ​ Good for Salesforce to Salesforce types of custom integrations. Apex REST Endpoint for Generic SObjects
  • 12. Example 4 Small examples: Crud Enforcement and Object Sorting
  • 13. ​ Required for AppExchange security review ​ Good way to enforce profile/permission set object and field-level security. ​ Existing Package for this: https://github.com/ZergyPoo/SFDCCrudEnforcementUtils Crud Enforcement
  • 14. ​ Custom SObject Sorting where SOQL falls short. ​ Good for fields that contain numbers and text. SObject Sorting
  • 16. ​ PromotionBuilder •  Gamification app •  Allows users to setup custom criteria against any of their objects •  Runs the same trigger code against the objects to check for gamification criteria. ​ Solomon365 •  Hub and Spoke model •  Data syncing back from the spokes to the hub organization •  Needed custom Apex REST endpoints to handle multiple types of objects with complex logic without having to duplicate code. Cool Real-World Examples
  • 17. The Good and the Bad Pros and Common Pitfalls of using Generic SObjects
  • 18. ​ Pros – What is great about using generic SObjects •  Lots of re-usable code •  Covering common functionality without have to copy and paste all the time •  Great for apps, lets your clients run your code against their own custom objects •  Dynamic SOQL ​ Cons – The ugly •  Much more prone to run-time error •  Can be more confusing to read the code •  Object instantiation can get a little wonky Pros and Cons
  • 20. ​ Pros and Cons of using generic SObjects in Apex code. ​ Some awesome code examples ​ Some Real-world applications What did we cover? Wrap-Up
  • 21. Any Questions? ​ Feel free to ask me anything (within reason)