SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
Developing Apex Triggers for Chatter
Chad Smith, Senior Consultant
Alternative Technology Solutions
@chad_w_smith
Safe harbor
Safe harbor statement under the Private Securities Litigation Reform Act of 1995:
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 Web site.
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.
Chad Smith
Senior Consultant,
Alternative Technology Solutions
@chad_w_smith
#SFChatterTrigger
Agenda
▪ Trigger Architecture
• Single trigger per object
• Utility Class for processing and DML operation

▪ Chatter Objects
• FeedItem
• EntitySubscription

▪ Example #1 – Auto-post to “Customer Win” Chatter Group
▪ Example #2 – Manager auto-follow “Big Deals”
▪ Example #3 – Auto-add new users to “Salesforce Q&A” Chatter Group
… before we begin
▪ Who is using Chatter now?
▪ Who is using trigger with Chatter?
▪ Who has written a trigger before?
Trigger Architecture
▪ Problems with multiple triggers on the same object
• Cannot control order of execution
• Organization of the org

▪ Solution

Class Code

• Single trigger per object
• Processing and DML
done within utility class

Trigger

Class Code

DML Statement
FeedItem Object
▪ “FeedItem represents an entry in the feed, such as changes in a record
feed, including text posts, link posts, and content posts.”
▪ Important Fields
• Body (Textarea) – The text or ‘body’ of the post
• ParentID (ID) – Chatter Group ID, AccountID, UserID (Profile Post)
• Type (Picklist) – TextPost, LinkPost, PollPost

▪ http://www.salesforce.
com/us/developer/docs/api/Content/sforce_api_objects_feeditem.htm
EntitySubscription Object
▪ “Represents a subscription for a user following a record or another
user.”
▪ Important Fields
• NetworkID (ID) – Community ID
• ParentID (ID) – ID of the record being followed
• SubscriberID (ID) – ID of the user following the record.

▪ Add Link to Docs
CollaborationGroupMember Object
▪ “Represents a member of a Chatter group.”
▪ Important Fields
• CollaborationGroupID (ID) – Chatter Group ID
• CollaborationRole (Picklist) – Admin or Standard
• MemberID (ID) – UserID of the Member
• NotificationFrequency (Picklist) – D for Daily, W for Weekly, N for Never, P for
Post

▪ http://www.salesforce.
com/us/developer/docs/api/Content/sforce_api_objects_collaborationgr
oupmember.htm
Object Model
Example #1 – Auto-Post to “Customer Win” Chatter
Group
▪ Post information to your “Customer Win” Chatter Group when your
opportunity goes to “Closed Won”
▪ Celebrate Victories!
▪ Minimize Emails in favor of Chatter (Chatter Adoption)
▪ Other Ideas
• Opportunity Next Action Group
• Project Next Action Group

▪ Code Walk Through
Example #2 – Manager Auto-Follow for Big Deals
▪ Set manager of a user to follow any opportunity over $5,000.
▪ Code Walk Through
Example #3 – Add new users to the “Salesforce
Q&A” Chatter Group
▪ Salesforce Chatter Group for Salesforce Questions & Answers
▪ Minimize support emails for your Administrator
▪ Drive Salesforce & Chatter Adoption
Deck & Code
▪ Dreamforce Session Chatter
▪ Alternative Technology Solutions Website
• http://alttechsolutions.com/http://alttechsolutions.com/SFtrigger
Email me!
• csmith@alttechsolutions.com
Chad Smith
Senior Consultant,
Alternative Technology Solutions

@chad_w_smith
Developing Apex Triggers for Chatter

Weitere ähnliche Inhalte

Was ist angesagt?

Developing Interactive Tables and Charts in Visualforce
Developing Interactive Tables and Charts in VisualforceDeveloping Interactive Tables and Charts in Visualforce
Developing Interactive Tables and Charts in VisualforceSalesforce Developers
 
Mds cloud saturday 2015 salesforce intro
Mds cloud saturday 2015 salesforce introMds cloud saturday 2015 salesforce intro
Mds cloud saturday 2015 salesforce introDavid Scruggs
 
Making Your Apex and Visualforce Reusable
Making Your Apex and Visualforce ReusableMaking Your Apex and Visualforce Reusable
Making Your Apex and Visualforce ReusableSalesforce Developers
 
The Visual Delta Force: Dynamic Visualforce Components
The Visual Delta Force: Dynamic Visualforce ComponentsThe Visual Delta Force: Dynamic Visualforce Components
The Visual Delta Force: Dynamic Visualforce ComponentsSalesforce Developers
 
Lightning Connect Custom Adapters: Connecting Anything with Salesforce
Lightning Connect Custom Adapters: Connecting Anything with SalesforceLightning Connect Custom Adapters: Connecting Anything with Salesforce
Lightning Connect Custom Adapters: Connecting Anything with SalesforceSalesforce Developers
 
Salesforce API Series: Integrating Applications with Force.com Webinar
Salesforce API Series: Integrating Applications with Force.com WebinarSalesforce API Series: Integrating Applications with Force.com Webinar
Salesforce API Series: Integrating Applications with Force.com WebinarSalesforce Developers
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce IntegrationJoshua Hoskins
 
Atl elevate programmatic developer slides
Atl elevate programmatic developer slidesAtl elevate programmatic developer slides
Atl elevate programmatic developer slidesDavid Scruggs
 
Lightning components performance best practices
Lightning components performance best practicesLightning components performance best practices
Lightning components performance best practicesSalesforce Developers
 
Unlocking the Hidden Potential of Salesforce Live Agent
Unlocking the Hidden Potential of Salesforce Live AgentUnlocking the Hidden Potential of Salesforce Live Agent
Unlocking the Hidden Potential of Salesforce Live AgentSalesforce Developers
 
Elevate workshop programmatic_2014
Elevate workshop programmatic_2014Elevate workshop programmatic_2014
Elevate workshop programmatic_2014David Scruggs
 
Salesforce DX Pilot Product Overview
Salesforce DX Pilot Product OverviewSalesforce DX Pilot Product Overview
Salesforce DX Pilot Product OverviewSalesforce Partners
 
Build Better Communities with Lightning
Build Better Communities with LightningBuild Better Communities with Lightning
Build Better Communities with LightningSalesforce Developers
 
ISV Tech Enablement Webinar April 2017
ISV Tech Enablement Webinar April 2017ISV Tech Enablement Webinar April 2017
ISV Tech Enablement Webinar April 2017Salesforce Partners
 
Modeling and Querying Data and Relationships in Salesforce
Modeling and Querying Data and Relationships in SalesforceModeling and Querying Data and Relationships in Salesforce
Modeling and Querying Data and Relationships in SalesforceSalesforce Developers
 
Real Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform EventsReal Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform EventsSalesforce Developers
 
Build Amazing Website without coding using Salesforce SiteForce
Build Amazing Website without coding using Salesforce SiteForceBuild Amazing Website without coding using Salesforce SiteForce
Build Amazing Website without coding using Salesforce SiteForcevraopolisetti
 

Was ist angesagt? (20)

Developing Interactive Tables and Charts in Visualforce
Developing Interactive Tables and Charts in VisualforceDeveloping Interactive Tables and Charts in Visualforce
Developing Interactive Tables and Charts in Visualforce
 
Mds cloud saturday 2015 salesforce intro
Mds cloud saturday 2015 salesforce introMds cloud saturday 2015 salesforce intro
Mds cloud saturday 2015 salesforce intro
 
Making Your Apex and Visualforce Reusable
Making Your Apex and Visualforce ReusableMaking Your Apex and Visualforce Reusable
Making Your Apex and Visualforce Reusable
 
The Visual Delta Force: Dynamic Visualforce Components
The Visual Delta Force: Dynamic Visualforce ComponentsThe Visual Delta Force: Dynamic Visualforce Components
The Visual Delta Force: Dynamic Visualforce Components
 
Lightning Connect Custom Adapters: Connecting Anything with Salesforce
Lightning Connect Custom Adapters: Connecting Anything with SalesforceLightning Connect Custom Adapters: Connecting Anything with Salesforce
Lightning Connect Custom Adapters: Connecting Anything with Salesforce
 
Salesforce API Series: Integrating Applications with Force.com Webinar
Salesforce API Series: Integrating Applications with Force.com WebinarSalesforce API Series: Integrating Applications with Force.com Webinar
Salesforce API Series: Integrating Applications with Force.com Webinar
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce Integration
 
Atl elevate programmatic developer slides
Atl elevate programmatic developer slidesAtl elevate programmatic developer slides
Atl elevate programmatic developer slides
 
Lightning components performance best practices
Lightning components performance best practicesLightning components performance best practices
Lightning components performance best practices
 
Unlocking the Hidden Potential of Salesforce Live Agent
Unlocking the Hidden Potential of Salesforce Live AgentUnlocking the Hidden Potential of Salesforce Live Agent
Unlocking the Hidden Potential of Salesforce Live Agent
 
Elevate workshop programmatic_2014
Elevate workshop programmatic_2014Elevate workshop programmatic_2014
Elevate workshop programmatic_2014
 
Salesforce DX Pilot Product Overview
Salesforce DX Pilot Product OverviewSalesforce DX Pilot Product Overview
Salesforce DX Pilot Product Overview
 
Build Better Communities with Lightning
Build Better Communities with LightningBuild Better Communities with Lightning
Build Better Communities with Lightning
 
Introduction to Apex for Developers
Introduction to Apex for DevelopersIntroduction to Apex for Developers
Introduction to Apex for Developers
 
ISV Tech Enablement Webinar April 2017
ISV Tech Enablement Webinar April 2017ISV Tech Enablement Webinar April 2017
ISV Tech Enablement Webinar April 2017
 
Modeling and Querying Data and Relationships in Salesforce
Modeling and Querying Data and Relationships in SalesforceModeling and Querying Data and Relationships in Salesforce
Modeling and Querying Data and Relationships in Salesforce
 
Real Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform EventsReal Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform Events
 
Using Apex for REST Integration
Using Apex for REST IntegrationUsing Apex for REST Integration
Using Apex for REST Integration
 
Coding in the App Cloud
Coding in the App CloudCoding in the App Cloud
Coding in the App Cloud
 
Build Amazing Website without coding using Salesforce SiteForce
Build Amazing Website without coding using Salesforce SiteForceBuild Amazing Website without coding using Salesforce SiteForce
Build Amazing Website without coding using Salesforce SiteForce
 

Ähnlich wie Developing Apex Triggers for Chatter

Moving Sharing to a Parallel Architecture
Moving Sharing to a Parallel ArchitectureMoving Sharing to a Parallel Architecture
Moving Sharing to a Parallel ArchitectureSalesforce Developers
 
Improving Customer Service with a Branded Self Service Portal
Improving Customer Service with a Branded Self Service PortalImproving Customer Service with a Branded Self Service Portal
Improving Customer Service with a Branded Self Service Portaldreamforce2006
 
Building Visualforce Custom Events Handlers
Building Visualforce Custom Events HandlersBuilding Visualforce Custom Events Handlers
Building Visualforce Custom Events HandlersSalesforce Developers
 
Visualforce Hack for Junction Objects
Visualforce Hack for Junction ObjectsVisualforce Hack for Junction Objects
Visualforce Hack for Junction ObjectsRitesh Aswaney
 
CLE TrailheaDX 2020 Global Gathering
CLE TrailheaDX 2020 Global GatheringCLE TrailheaDX 2020 Global Gathering
CLE TrailheaDX 2020 Global GatheringLynda Kane
 
ISV Tech Talk: Usage Metrics (October 15, 2014)
ISV Tech Talk: Usage Metrics (October 15, 2014)ISV Tech Talk: Usage Metrics (October 15, 2014)
ISV Tech Talk: Usage Metrics (October 15, 2014)Salesforce Partners
 
Extracting Microservices from your Monolithic org - Strategies and Tactics
Extracting Microservices from your Monolithic org - Strategies and TacticsExtracting Microservices from your Monolithic org - Strategies and Tactics
Extracting Microservices from your Monolithic org - Strategies and TacticsJigar Shah
 
Txd19 speaker session template v1
Txd19 speaker session template v1Txd19 speaker session template v1
Txd19 speaker session template v1rikkehovgaard
 
Salesforce knowledge user group july2013
Salesforce knowledge user group   july2013Salesforce knowledge user group   july2013
Salesforce knowledge user group july2013Francois Lopitaux
 
Admin Best Practices: Remove Security Risk From Your Org with a User Audit
Admin Best Practices: Remove Security Risk From Your Org with a User AuditAdmin Best Practices: Remove Security Risk From Your Org with a User Audit
Admin Best Practices: Remove Security Risk From Your Org with a User AuditSalesforce Admins
 
The Power of Salesforce APIs World Tour Edition
The Power of Salesforce APIs World Tour EditionThe Power of Salesforce APIs World Tour Edition
The Power of Salesforce APIs World Tour EditionPeter Chittum
 
Building Mobile Apps That Deliver Salesforce to Your Employees
Building Mobile Apps That Deliver Salesforce to Your EmployeesBuilding Mobile Apps That Deliver Salesforce to Your Employees
Building Mobile Apps That Deliver Salesforce to Your EmployeesSalesforce Developers
 
Data.com APIs in Action ? Bringing Data to Life in Salesforce
Data.com APIs in Action ? Bringing Data to Life in SalesforceData.com APIs in Action ? Bringing Data to Life in Salesforce
Data.com APIs in Action ? Bringing Data to Life in SalesforceSalesforce Developers
 
Become a Superstar Admin with Custom Metadata Types
Become a Superstar Admin with Custom Metadata TypesBecome a Superstar Admin with Custom Metadata Types
Become a Superstar Admin with Custom Metadata TypesSalesforce Admins
 
Aan010 Young 091907
Aan010 Young 091907Aan010 Young 091907
Aan010 Young 091907Dreamforce07
 
Singapore dg salesforce einstein + spring 17 release by manish
Singapore dg   salesforce einstein + spring 17 release by manishSingapore dg   salesforce einstein + spring 17 release by manish
Singapore dg salesforce einstein + spring 17 release by manishManish Thaduri
 
CCT London 2013 Theatre Intro to Apex
CCT London 2013 Theatre Intro to ApexCCT London 2013 Theatre Intro to Apex
CCT London 2013 Theatre Intro to ApexPeter Chittum
 
Platform Encryption World Tour Admin Zone
Platform Encryption World Tour Admin ZonePlatform Encryption World Tour Admin Zone
Platform Encryption World Tour Admin ZonePeter Chittum
 

Ähnlich wie Developing Apex Triggers for Chatter (20)

Introduction to Force.com
Introduction to Force.comIntroduction to Force.com
Introduction to Force.com
 
Moving Sharing to a Parallel Architecture
Moving Sharing to a Parallel ArchitectureMoving Sharing to a Parallel Architecture
Moving Sharing to a Parallel Architecture
 
Improving Customer Service with a Branded Self Service Portal
Improving Customer Service with a Branded Self Service PortalImproving Customer Service with a Branded Self Service Portal
Improving Customer Service with a Branded Self Service Portal
 
Building Visualforce Custom Events Handlers
Building Visualforce Custom Events HandlersBuilding Visualforce Custom Events Handlers
Building Visualforce Custom Events Handlers
 
Visualforce Hack for Junction Objects
Visualforce Hack for Junction ObjectsVisualforce Hack for Junction Objects
Visualforce Hack for Junction Objects
 
CLE TrailheaDX 2020 Global Gathering
CLE TrailheaDX 2020 Global GatheringCLE TrailheaDX 2020 Global Gathering
CLE TrailheaDX 2020 Global Gathering
 
Introduction to Data.com APIs
Introduction to Data.com APIsIntroduction to Data.com APIs
Introduction to Data.com APIs
 
ISV Tech Talk: Usage Metrics (October 15, 2014)
ISV Tech Talk: Usage Metrics (October 15, 2014)ISV Tech Talk: Usage Metrics (October 15, 2014)
ISV Tech Talk: Usage Metrics (October 15, 2014)
 
Extracting Microservices from your Monolithic org - Strategies and Tactics
Extracting Microservices from your Monolithic org - Strategies and TacticsExtracting Microservices from your Monolithic org - Strategies and Tactics
Extracting Microservices from your Monolithic org - Strategies and Tactics
 
Txd19 speaker session template v1
Txd19 speaker session template v1Txd19 speaker session template v1
Txd19 speaker session template v1
 
Salesforce knowledge user group july2013
Salesforce knowledge user group   july2013Salesforce knowledge user group   july2013
Salesforce knowledge user group july2013
 
Admin Best Practices: Remove Security Risk From Your Org with a User Audit
Admin Best Practices: Remove Security Risk From Your Org with a User AuditAdmin Best Practices: Remove Security Risk From Your Org with a User Audit
Admin Best Practices: Remove Security Risk From Your Org with a User Audit
 
The Power of Salesforce APIs World Tour Edition
The Power of Salesforce APIs World Tour EditionThe Power of Salesforce APIs World Tour Edition
The Power of Salesforce APIs World Tour Edition
 
Building Mobile Apps That Deliver Salesforce to Your Employees
Building Mobile Apps That Deliver Salesforce to Your EmployeesBuilding Mobile Apps That Deliver Salesforce to Your Employees
Building Mobile Apps That Deliver Salesforce to Your Employees
 
Data.com APIs in Action ? Bringing Data to Life in Salesforce
Data.com APIs in Action ? Bringing Data to Life in SalesforceData.com APIs in Action ? Bringing Data to Life in Salesforce
Data.com APIs in Action ? Bringing Data to Life in Salesforce
 
Become a Superstar Admin with Custom Metadata Types
Become a Superstar Admin with Custom Metadata TypesBecome a Superstar Admin with Custom Metadata Types
Become a Superstar Admin with Custom Metadata Types
 
Aan010 Young 091907
Aan010 Young 091907Aan010 Young 091907
Aan010 Young 091907
 
Singapore dg salesforce einstein + spring 17 release by manish
Singapore dg   salesforce einstein + spring 17 release by manishSingapore dg   salesforce einstein + spring 17 release by manish
Singapore dg salesforce einstein + spring 17 release by manish
 
CCT London 2013 Theatre Intro to Apex
CCT London 2013 Theatre Intro to ApexCCT London 2013 Theatre Intro to Apex
CCT London 2013 Theatre Intro to Apex
 
Platform Encryption World Tour Admin Zone
Platform Encryption World Tour Admin ZonePlatform Encryption World Tour Admin Zone
Platform Encryption World Tour Admin Zone
 

Mehr von 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 DevelopersSalesforce 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 PerformanceSalesforce 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 ComponentsSalesforce Developers
 
TrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsTrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsSalesforce 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 IndiaSalesforce 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 DevelopmentSalesforce 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 ComponentsSalesforce 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 ComponentsSalesforce Developers
 
TrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsTrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsSalesforce 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 TestingSalesforce 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 InteroperabilitySalesforce 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 dataSalesforce 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 IntroductionSalesforce 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 JSQCPSalesforce 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 SalesforceSalesforce 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 CaptureSalesforce Developers
 
Modern Development with Salesforce DX
Modern Development with Salesforce DXModern Development with Salesforce DX
Modern Development with Salesforce DXSalesforce 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
 

Mehr von 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
 

Kürzlich hochgeladen

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Kürzlich hochgeladen (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Developing Apex Triggers for Chatter

  • 1. Developing Apex Triggers for Chatter Chad Smith, Senior Consultant Alternative Technology Solutions @chad_w_smith
  • 2. Safe harbor Safe harbor statement under the Private Securities Litigation Reform Act of 1995: 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 Web site. 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.
  • 3. Chad Smith Senior Consultant, Alternative Technology Solutions @chad_w_smith #SFChatterTrigger
  • 4. Agenda ▪ Trigger Architecture • Single trigger per object • Utility Class for processing and DML operation ▪ Chatter Objects • FeedItem • EntitySubscription ▪ Example #1 – Auto-post to “Customer Win” Chatter Group ▪ Example #2 – Manager auto-follow “Big Deals” ▪ Example #3 – Auto-add new users to “Salesforce Q&A” Chatter Group
  • 5. … before we begin ▪ Who is using Chatter now? ▪ Who is using trigger with Chatter? ▪ Who has written a trigger before?
  • 6. Trigger Architecture ▪ Problems with multiple triggers on the same object • Cannot control order of execution • Organization of the org ▪ Solution Class Code • Single trigger per object • Processing and DML done within utility class Trigger Class Code DML Statement
  • 7. FeedItem Object ▪ “FeedItem represents an entry in the feed, such as changes in a record feed, including text posts, link posts, and content posts.” ▪ Important Fields • Body (Textarea) – The text or ‘body’ of the post • ParentID (ID) – Chatter Group ID, AccountID, UserID (Profile Post) • Type (Picklist) – TextPost, LinkPost, PollPost ▪ http://www.salesforce. com/us/developer/docs/api/Content/sforce_api_objects_feeditem.htm
  • 8. EntitySubscription Object ▪ “Represents a subscription for a user following a record or another user.” ▪ Important Fields • NetworkID (ID) – Community ID • ParentID (ID) – ID of the record being followed • SubscriberID (ID) – ID of the user following the record. ▪ Add Link to Docs
  • 9. CollaborationGroupMember Object ▪ “Represents a member of a Chatter group.” ▪ Important Fields • CollaborationGroupID (ID) – Chatter Group ID • CollaborationRole (Picklist) – Admin or Standard • MemberID (ID) – UserID of the Member • NotificationFrequency (Picklist) – D for Daily, W for Weekly, N for Never, P for Post ▪ http://www.salesforce. com/us/developer/docs/api/Content/sforce_api_objects_collaborationgr oupmember.htm
  • 11. Example #1 – Auto-Post to “Customer Win” Chatter Group ▪ Post information to your “Customer Win” Chatter Group when your opportunity goes to “Closed Won” ▪ Celebrate Victories! ▪ Minimize Emails in favor of Chatter (Chatter Adoption) ▪ Other Ideas • Opportunity Next Action Group • Project Next Action Group ▪ Code Walk Through
  • 12. Example #2 – Manager Auto-Follow for Big Deals ▪ Set manager of a user to follow any opportunity over $5,000. ▪ Code Walk Through
  • 13. Example #3 – Add new users to the “Salesforce Q&A” Chatter Group ▪ Salesforce Chatter Group for Salesforce Questions & Answers ▪ Minimize support emails for your Administrator ▪ Drive Salesforce & Chatter Adoption
  • 14. Deck & Code ▪ Dreamforce Session Chatter ▪ Alternative Technology Solutions Website • http://alttechsolutions.com/http://alttechsolutions.com/SFtrigger Email me! • csmith@alttechsolutions.com
  • 15. Chad Smith Senior Consultant, Alternative Technology Solutions @chad_w_smith