SlideShare a Scribd company logo
Lightning Message Service
@pchittum | pchittum@salesforce.com
Peter Chittum, Sr Director Developer Evangelism
Forward-Looking Statement
Statement under the Private Securities Litigation Reform Act of 1995:
This presentation contains forward-looking statements about the company’s financial and operating results, which may include expected GAAP and non-GAAP financial and other operating
and non-operating results, including revenue, net income, diluted earnings per share, operating cash flow growth, operating margin improvement, expected revenue growth, expected
current remaining performance obligation growth, expected tax rates, the one-time accounting non-cash charge that was incurred in connection with the Salesforce.org combination; stock-
based compensation expenses, amortization of purchased intangibles, shares outstanding, market growth and sustainability goals. The achievement or success of the matters covered by
such forward-looking statements involves risks, uncertainties and assumptions. If any such risks or uncertainties materialize or if any of the assumptions prove incorrect, the company’s
results could differ materially from the results expressed or implied by the forward-looking statements we make.
The risks and uncertainties referred to above include -- but are not limited to -- risks associated with the effect of general economic and market conditions; the impact of geopolitical events;
the impact of foreign currency exchange rate and interest rate fluctuations on our results; our business strategy and our plan to build our business, including our strategy to be the leading
provider of enterprise cloud computing applications and platforms; the pace of change and innovation in enterprise cloud computing services; the seasonal nature of our sales cycles; the
competitive nature of the market in which we participate; our international expansion strategy; the demands on our personnel and infrastructure resulting from significant growth in our
customer base and operations, including as a result of acquisitions; our service performance and security, including the resources and costs required to avoid unanticipated downtime and
prevent, detect and remediate potential security breaches; the expenses associated with new data centers and third-party infrastructure providers; additional data center capacity; real estate
and office facilities space; our operating results and cash flows; new services and product features, including any efforts to expand our services beyond the CRM market; our strategy of
acquiring or making investments in complementary businesses, joint ventures, services, technologies and intellectual property rights; the performance and fair value of our investments in
complementary businesses through our strategic investment portfolio; our ability to realize the benefits from strategic partnerships, joint ventures and investments; the impact of future gains
or losses from our strategic investment portfolio, including gains or losses from overall market conditions that may affect the publicly traded companies within the company's strategic
investment portfolio; our ability to execute our business plans; our ability to successfully integrate acquired businesses and technologies, including delays related to the integration of
Tableau due to regulatory review by the United Kingdom Competition and Markets Authority; our ability to continue to grow unearned revenue and remaining performance obligation; our
ability to protect our intellectual property rights; our ability to develop our brands; our reliance on third-party hardware, software and platform providers; our dependency on the development
and maintenance of the infrastructure of the Internet; the
effect of evolving domestic and foreign government regulations, including those related to the provision of services on the Internet, those related to accessing the Internet, and those
addressing data privacy, cross-border data transfers and import and export controls; the valuation of our deferred tax assets and the release of related valuation allowances; the potential
availability of additional tax assets in the future; the impact of new accounting pronouncements and tax laws; uncertainties affecting our ability to estimate our tax
rate; the impact of expensing stock options and other equity awards; the sufficiency of our capital resources; factors related to our outstanding debt, revolving credit facility, term loan and
loan associated with 50 Fremont; compliance with our debt covenants and lease obligations; current and potential litigation involving us; and the impact of climate change.
Further information on these and other factors that could affect the company’s financial results is included in the reports on Forms 10-K, 10-Q and 8-K and in other filings it makes with the
Securities and Exchange Commission from time to time. These documents are available on the SEC Filings section of the Investor Information section of the company’s website at
www.salesforce.com/investor.
Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements, except as required by law.
Agenda
Intro to LMS
Demo
Footer
Principles of Message Service
Client-side event bus between DOM branches
LWC, Aura, and Visualforce as Equal Citizens
Don't Be Surprising (Scope)
Communication between DOM Branches
LWC, Aura, Visualforce as Equal Citizens
Demo
Context
Distinguish between different near-root level DOM features
Scope
Whether a subscriber remains active when its context becomes inactive
Resources
Learn MOAR Summer 20 Release blog: https://bit.ly/lms-launch-blog
Follow the work in this github issue: https://bit.ly/lms-recipe-issue
Scoped Messaging example: https://bit.ly/lms-with-scope
Appendix A: All The Samples
Where can I go to find other resources to learn about
LMS (apart from the docs, of course)
Internal LMS Example Inventory
LWC Recipes Sample App
● LWC Publisher
● LWC Subscriber
● Aura Publisher
● Aura Subscriber
● VF Publisher
○ Page and Static Resource
● VF Subscriber (with postback)
○ Page and Static Resource
● VF Subscriber (with remote obj)
○ Page and Static Resource
E-Bikes Sample App
● productTileList
● productCard
● productFilter
Dreamhouse Sample App
● propertySummary
● daysOnMarket
● propertyFilter
● propertyMap
● propertyTileList
Easy Spaces Sample App
● reservationHelper
● reservationList
● customerList
● spaceDesigner
Trailhead Modules and Projects
● Build a Bear-Tracking App with Lightning
Web Components Project
Appendix: the LMS APIs
A summary of interacting with LMS across all three
Salesforce UI technologies: LWC, Aura, Visualforce
LMS Moving Parts
The message service: the reusable parts, used to publish, subscribe, etc.
The message channel: a way to name and segment messages
(Note: for all examples we're using the recipes in the LWC Recipes sample app)
The above message channel would be referenced as Record_Selected__c in code
Message Channel Metadata
Definining a Message Channel
Import via ES6 modules
import { subscribe, publish, MessageContext } from 'lightning/messageService';
import RECORD_SELECTED_CHANNEL from '@salesforce/messageChannel/Record_Selected__c';
LMS in LWC
MessageService imports
● publish
● subscribe
● unsubscribe
● MessageContext
● APPLICATION_SCOPE
Message Channel
● Surfaced as an ES6 module by API name
in the @salesforce module scope
● Use default import syntax
export default class LmsPublisherWebComponent extends LightningElement {
@wire(getContactList)
contacts;
@wire(MessageContext)
messageContext;
// Respond to UI event by publishing message
handleContactSelect(event) {
const payload = { recordId: event.target.contact.Id };
publish(this.messageContext, RECORD_SELECTED_CHANNEL, payload);
}
}
In LWC
Publishing a Message
export default class LmsSubscriberWebComponent extends LightningElement {
subscription = null;
...
@wire(MessageContext)
messageContext;
...
subscribeToMessageChannel() {
this.subscription = subscribe(
this.messageContext,
RECORD_SELECTED_CHANNEL,
(message) => this.handleMessage(message)
);
}
...
connectedCallback() {
this.subscribeToMessageChannel();
}
In LWC
Subscribing to a Message Channel
Access via the aura <lightning:messageChannel/> component
<lightning:messageChannel type="Record_Selected__c" onMessage="{!c.handleMessage}" />
LMS in Aura
lightning:messageChannel attributes
● onMessage
● scope
● type
One tag to rule them all
● Same tag for publishers and subscribers
● Subscription is implicit when handler
specified
● Message channel specified by literal
unqualified API name
In markup
<lightning:messageChannel
type="Record_Selected__c"
aura:id="recordSelected"
/>
In your controller
var payload = { recordId: event.target.contact.Id };
component.find('recordSelected').publish(payload);
In Aura
Publishing a Message
<lightning:messageChannel
type="Record_Selected__c"
aura:id="recordSelected"
onMessage="{!c.handleMessage}"
/>
...yep...that's literally all you do
In Aura
Subscribing to a Message Channel
Access via standard Visualforce objects
setPageConfigs({
messageChannel: '{!$MessageChannel.Record_Selected__c}',
lmsSubscribe: sforce.one.subscribe
});
LMS in Visualforce
sforce.one functions
● publish
● subscribe
● unsubscribe
Message Channel
● Surfaced as a global variable by API name
under $MessageChannel
● Bind and assign to a JS variable
Visualforce page
setPageConfigs({
messageChannel: '{!$MessageChannel.Record_Selected__c}',
lmsPublish: sforce.one.publish
});
Static resource JS module
const payload = { recordId: selectedIdNode.dataset.id };
_pageConfigs.lmsPublish(_pageConfigs.messageChannel, payload);
In Visualforce
Publishing a Message
Visualforce page
setPageConfigs({
messageChannel: '{!$MessageChannel.Record_Selected__c}',
lmsSubscribe: sforce.one.subscribe
});
Static resource JS module
document.addEventListener('readystatechange', (event) => {
if (event.target.readyState === 'complete') {
lmsChannelSubscription = _pageConfigs.lmsSubscribe(
_pageConfigs.messageChannel,
handleLMSMessageRemoting
);
}
});
In Visualforce
Subscribing to a Message Channel

More Related Content

What's hot

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
 
Secure Salesforce: External App Integrations
Secure Salesforce: External App IntegrationsSecure Salesforce: External App Integrations
Secure Salesforce: External App Integrations
Salesforce Developers
 
Integrating with salesforce
Integrating with salesforceIntegrating with salesforce
Integrating with salesforce
Mark Adcock
 
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
 
DevOps Center_ArchitectGroup
DevOps Center_ArchitectGroup DevOps Center_ArchitectGroup
DevOps Center_ArchitectGroup
AmeyKulkarni84
 
Release & Change management in salesforce
Release & Change management in salesforceRelease & Change management in salesforce
Release & Change management in salesforce
Kalyan Lanka ☁
 
Manage Salesforce Like a Pro with Governance
Manage Salesforce Like a Pro with GovernanceManage Salesforce Like a Pro with Governance
Manage Salesforce Like a Pro with Governance
Salesforce Admins
 
Integrating with salesforce using platform events
Integrating with salesforce using platform eventsIntegrating with salesforce using platform events
Integrating with salesforce using platform events
Amit Chaudhary
 
Salesforce Development Best Practices
Salesforce Development Best PracticesSalesforce Development Best Practices
Salesforce Development Best Practices
Vivek Chawla
 
Salesforce Integration Patterns
Salesforce Integration PatternsSalesforce Integration Patterns
Salesforce Integration Patterns
usolutions
 
Webinar: Take Control of Your Org with Salesforce Optimizer
Webinar: Take Control of Your Org with Salesforce OptimizerWebinar: Take Control of Your Org with Salesforce Optimizer
Webinar: Take Control of Your Org with Salesforce Optimizer
Salesforce Admins
 
Getting started with Salesforce security
Getting started with Salesforce securityGetting started with Salesforce security
Getting started with Salesforce security
Salesforce Admins
 
Decluttering your Salesfroce org
Decluttering your Salesfroce orgDecluttering your Salesfroce org
Decluttering your Salesfroce org
Roy Gilad
 
Discover salesforce, dev ops and Copado CI/CD automations
Discover salesforce, dev ops and Copado CI/CD automationsDiscover salesforce, dev ops and Copado CI/CD automations
Discover salesforce, dev ops and Copado CI/CD automations
JackGuo20
 
Salesforce Steelbrick CPQ Overview
Salesforce Steelbrick CPQ OverviewSalesforce Steelbrick CPQ Overview
Salesforce Steelbrick CPQ Overview
Harshala Shewale ☁
 
Salesforce Integration Pattern Overview
Salesforce Integration Pattern OverviewSalesforce Integration Pattern Overview
Salesforce Integration Pattern Overview
Dhanik Sahni
 
Managing the Role Hierarchy at Enterprise Scale
Managing the Role Hierarchy at Enterprise ScaleManaging the Role Hierarchy at Enterprise Scale
Managing the Role Hierarchy at Enterprise ScaleSalesforce Developers
 
Apex Testing Best Practices
Apex Testing Best PracticesApex Testing Best Practices
Apex Testing Best Practices
Salesforce Developers
 
Deep dive into Salesforce Connected App
Deep dive into Salesforce Connected AppDeep dive into Salesforce Connected App
Deep dive into Salesforce Connected App
Dhanik Sahni
 

What's hot (20)

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
 
Secure Salesforce: External App Integrations
Secure Salesforce: External App IntegrationsSecure Salesforce: External App Integrations
Secure Salesforce: External App Integrations
 
Integrating with salesforce
Integrating with salesforceIntegrating with salesforce
Integrating with salesforce
 
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
 
DevOps Center_ArchitectGroup
DevOps Center_ArchitectGroup DevOps Center_ArchitectGroup
DevOps Center_ArchitectGroup
 
Release & Change management in salesforce
Release & Change management in salesforceRelease & Change management in salesforce
Release & Change management in salesforce
 
Manage Salesforce Like a Pro with Governance
Manage Salesforce Like a Pro with GovernanceManage Salesforce Like a Pro with Governance
Manage Salesforce Like a Pro with Governance
 
Integrating with salesforce using platform events
Integrating with salesforce using platform eventsIntegrating with salesforce using platform events
Integrating with salesforce using platform events
 
Salesforce Development Best Practices
Salesforce Development Best PracticesSalesforce Development Best Practices
Salesforce Development Best Practices
 
Salesforce Integration Patterns
Salesforce Integration PatternsSalesforce Integration Patterns
Salesforce Integration Patterns
 
Webinar: Take Control of Your Org with Salesforce Optimizer
Webinar: Take Control of Your Org with Salesforce OptimizerWebinar: Take Control of Your Org with Salesforce Optimizer
Webinar: Take Control of Your Org with Salesforce Optimizer
 
Getting started with Salesforce security
Getting started with Salesforce securityGetting started with Salesforce security
Getting started with Salesforce security
 
Decluttering your Salesfroce org
Decluttering your Salesfroce orgDecluttering your Salesfroce org
Decluttering your Salesfroce org
 
Discover salesforce, dev ops and Copado CI/CD automations
Discover salesforce, dev ops and Copado CI/CD automationsDiscover salesforce, dev ops and Copado CI/CD automations
Discover salesforce, dev ops and Copado CI/CD automations
 
Salesforce Steelbrick CPQ Overview
Salesforce Steelbrick CPQ OverviewSalesforce Steelbrick CPQ Overview
Salesforce Steelbrick CPQ Overview
 
Salesforce Integration Pattern Overview
Salesforce Integration Pattern OverviewSalesforce Integration Pattern Overview
Salesforce Integration Pattern Overview
 
Managing the Role Hierarchy at Enterprise Scale
Managing the Role Hierarchy at Enterprise ScaleManaging the Role Hierarchy at Enterprise Scale
Managing the Role Hierarchy at Enterprise Scale
 
Governor limits
Governor limitsGovernor limits
Governor limits
 
Apex Testing Best Practices
Apex Testing Best PracticesApex Testing Best Practices
Apex Testing Best Practices
 
Deep dive into Salesforce Connected App
Deep dive into Salesforce Connected AppDeep dive into Salesforce Connected App
Deep dive into Salesforce Connected App
 

Similar to LMS Lightning Message Service

Kitchener Developer Group's session on "All about events"
Kitchener Developer Group's session on "All about events"Kitchener Developer Group's session on "All about events"
Kitchener Developer Group's session on "All about events"
Sudipta Deb ☁
 
WT19: Platform Events Are for Admins Too!
WT19: Platform Events Are for Admins Too! WT19: Platform Events Are for Admins Too!
WT19: Platform Events Are for Admins Too!
Salesforce Admins
 
Winter '22 highlights
Winter '22 highlightsWinter '22 highlights
Winter '22 highlights
AtaullahKhan31
 
TrailheadX Presentation - 2020 Cluj
TrailheadX Presentation -  2020 ClujTrailheadX Presentation -  2020 Cluj
TrailheadX Presentation - 2020 Cluj
Arpad Komaromi
 
Stephen's 10 ish favourite spring'20 features
Stephen's 10 ish favourite spring'20 featuresStephen's 10 ish favourite spring'20 features
Stephen's 10 ish favourite spring'20 features
Auckland Salesforce User Group
 
Alba Rivas - Building Slack Applications with Bolt.js.pdf
Alba Rivas - Building Slack Applications with Bolt.js.pdfAlba Rivas - Building Slack Applications with Bolt.js.pdf
Alba Rivas - Building Slack Applications with Bolt.js.pdf
MarkPawlikowski2
 
Los Angeles Admin Trailblazer Community Group TrailheaDX 2020 Global Gatherin...
Los Angeles Admin Trailblazer Community Group TrailheaDX 2020 Global Gatherin...Los Angeles Admin Trailblazer Community Group TrailheaDX 2020 Global Gatherin...
Los Angeles Admin Trailblazer Community Group TrailheaDX 2020 Global Gatherin...
Russell Feldman
 
Dreamforce Global Gathering
Dreamforce Global GatheringDreamforce Global Gathering
Dreamforce Global Gathering
Sudipta Deb ☁
 
Lightning Components 101: An Apex Developer's Guide
Lightning Components 101: An Apex Developer's GuideLightning Components 101: An Apex Developer's Guide
Lightning Components 101: An Apex Developer's Guide
Adam Olshansky
 
Salesforce Stamford developer group - power of flows
Salesforce Stamford developer group - power of flowsSalesforce Stamford developer group - power of flows
Salesforce Stamford developer group - power of flows
Amol Dixit
 
Deep dive into salesforce connected app part 4
Deep dive into salesforce connected app   part 4Deep dive into salesforce connected app   part 4
Deep dive into salesforce connected app part 4
Mohith Shrivastava
 
TDX Global Gathering - Wellington UG
TDX Global Gathering - Wellington UGTDX Global Gathering - Wellington UG
TDX Global Gathering - Wellington UG
Stephan Chandler-Garcia
 
Stamford developer group Experience Cloud
Stamford developer group   Experience CloudStamford developer group   Experience Cloud
Stamford developer group Experience Cloud
Amol Dixit
 
Summer 23 LWC Updates + Slack Apps.pptx
Summer 23 LWC Updates + Slack Apps.pptxSummer 23 LWC Updates + Slack Apps.pptx
Summer 23 LWC Updates + Slack Apps.pptx
Kishore B T
 
Delivering powerful integrations without code using out-of-the-box Salesforce...
Delivering powerful integrations without code using out-of-the-box Salesforce...Delivering powerful integrations without code using out-of-the-box Salesforce...
Delivering powerful integrations without code using out-of-the-box Salesforce...
Cynoteck Technology Solutions Private Limited
 
Spring 21 Salesforce Release Highlights with Awesome Admin Marc Baizman Welli...
Spring 21 Salesforce Release Highlights with Awesome Admin Marc Baizman Welli...Spring 21 Salesforce Release Highlights with Awesome Admin Marc Baizman Welli...
Spring 21 Salesforce Release Highlights with Awesome Admin Marc Baizman Welli...
Anna Loughnan Colquhoun
 
London Salesforce Developers TDX 20 Global Gathering
London Salesforce Developers TDX 20 Global GatheringLondon Salesforce Developers TDX 20 Global Gathering
London Salesforce Developers TDX 20 Global Gathering
Keir Bowden
 
Introduction to Salesforce Pub-Sub APIs/Architecture
Introduction to Salesforce Pub-Sub APIs/ArchitectureIntroduction to Salesforce Pub-Sub APIs/Architecture
Introduction to Salesforce Pub-Sub APIs/Architecture
Amol Dixit
 
Jaipur MuleSoft Meetup No. 3
Jaipur MuleSoft Meetup No. 3Jaipur MuleSoft Meetup No. 3
Jaipur MuleSoft Meetup No. 3
Lalit Panwar
 
Stamford developer group Omni channel
Stamford developer group Omni channelStamford developer group Omni channel
Stamford developer group Omni channel
Amol Dixit
 

Similar to LMS Lightning Message Service (20)

Kitchener Developer Group's session on "All about events"
Kitchener Developer Group's session on "All about events"Kitchener Developer Group's session on "All about events"
Kitchener Developer Group's session on "All about events"
 
WT19: Platform Events Are for Admins Too!
WT19: Platform Events Are for Admins Too! WT19: Platform Events Are for Admins Too!
WT19: Platform Events Are for Admins Too!
 
Winter '22 highlights
Winter '22 highlightsWinter '22 highlights
Winter '22 highlights
 
TrailheadX Presentation - 2020 Cluj
TrailheadX Presentation -  2020 ClujTrailheadX Presentation -  2020 Cluj
TrailheadX Presentation - 2020 Cluj
 
Stephen's 10 ish favourite spring'20 features
Stephen's 10 ish favourite spring'20 featuresStephen's 10 ish favourite spring'20 features
Stephen's 10 ish favourite spring'20 features
 
Alba Rivas - Building Slack Applications with Bolt.js.pdf
Alba Rivas - Building Slack Applications with Bolt.js.pdfAlba Rivas - Building Slack Applications with Bolt.js.pdf
Alba Rivas - Building Slack Applications with Bolt.js.pdf
 
Los Angeles Admin Trailblazer Community Group TrailheaDX 2020 Global Gatherin...
Los Angeles Admin Trailblazer Community Group TrailheaDX 2020 Global Gatherin...Los Angeles Admin Trailblazer Community Group TrailheaDX 2020 Global Gatherin...
Los Angeles Admin Trailblazer Community Group TrailheaDX 2020 Global Gatherin...
 
Dreamforce Global Gathering
Dreamforce Global GatheringDreamforce Global Gathering
Dreamforce Global Gathering
 
Lightning Components 101: An Apex Developer's Guide
Lightning Components 101: An Apex Developer's GuideLightning Components 101: An Apex Developer's Guide
Lightning Components 101: An Apex Developer's Guide
 
Salesforce Stamford developer group - power of flows
Salesforce Stamford developer group - power of flowsSalesforce Stamford developer group - power of flows
Salesforce Stamford developer group - power of flows
 
Deep dive into salesforce connected app part 4
Deep dive into salesforce connected app   part 4Deep dive into salesforce connected app   part 4
Deep dive into salesforce connected app part 4
 
TDX Global Gathering - Wellington UG
TDX Global Gathering - Wellington UGTDX Global Gathering - Wellington UG
TDX Global Gathering - Wellington UG
 
Stamford developer group Experience Cloud
Stamford developer group   Experience CloudStamford developer group   Experience Cloud
Stamford developer group Experience Cloud
 
Summer 23 LWC Updates + Slack Apps.pptx
Summer 23 LWC Updates + Slack Apps.pptxSummer 23 LWC Updates + Slack Apps.pptx
Summer 23 LWC Updates + Slack Apps.pptx
 
Delivering powerful integrations without code using out-of-the-box Salesforce...
Delivering powerful integrations without code using out-of-the-box Salesforce...Delivering powerful integrations without code using out-of-the-box Salesforce...
Delivering powerful integrations without code using out-of-the-box Salesforce...
 
Spring 21 Salesforce Release Highlights with Awesome Admin Marc Baizman Welli...
Spring 21 Salesforce Release Highlights with Awesome Admin Marc Baizman Welli...Spring 21 Salesforce Release Highlights with Awesome Admin Marc Baizman Welli...
Spring 21 Salesforce Release Highlights with Awesome Admin Marc Baizman Welli...
 
London Salesforce Developers TDX 20 Global Gathering
London Salesforce Developers TDX 20 Global GatheringLondon Salesforce Developers TDX 20 Global Gathering
London Salesforce Developers TDX 20 Global Gathering
 
Introduction to Salesforce Pub-Sub APIs/Architecture
Introduction to Salesforce Pub-Sub APIs/ArchitectureIntroduction to Salesforce Pub-Sub APIs/Architecture
Introduction to Salesforce Pub-Sub APIs/Architecture
 
Jaipur MuleSoft Meetup No. 3
Jaipur MuleSoft Meetup No. 3Jaipur MuleSoft Meetup No. 3
Jaipur MuleSoft Meetup No. 3
 
Stamford developer group Omni channel
Stamford developer group Omni channelStamford developer group Omni channel
Stamford developer group Omni channel
 

More from Peter Chittum

Dreamforce 2013 - Enhancing the Chatter Feed with Topics and Apex
Dreamforce 2013 - Enhancing the Chatter Feed with Topics and ApexDreamforce 2013 - Enhancing the Chatter Feed with Topics and Apex
Dreamforce 2013 - Enhancing the Chatter Feed with Topics and Apex
Peter Chittum
 
Winter 21 Developer Highlights for Salesforce
Winter 21 Developer Highlights for SalesforceWinter 21 Developer Highlights for Salesforce
Winter 21 Developer Highlights for Salesforce
Peter Chittum
 
Apply the Salesforce CLI To Everyday Problems
Apply the Salesforce CLI To Everyday ProblemsApply the Salesforce CLI To Everyday Problems
Apply the Salesforce CLI To Everyday Problems
Peter Chittum
 
If You Can Write a Salesforce Formula, You Can Use the Command Line
If You Can Write a Salesforce Formula, You Can Use the Command LineIf You Can Write a Salesforce Formula, You Can Use the Command Line
If You Can Write a Salesforce Formula, You Can Use the Command Line
Peter Chittum
 
If you can write a Salesforce Formula you can use the command line
If you can write a Salesforce Formula you can use the command lineIf you can write a Salesforce Formula you can use the command line
If you can write a Salesforce Formula you can use the command line
Peter Chittum
 
Do Not Fear the Command Line
Do Not Fear the Command LineDo Not Fear the Command Line
Do Not Fear the Command Line
Peter Chittum
 
Don't Fear the Command Line
Don't Fear the Command LineDon't Fear the Command Line
Don't Fear the Command Line
Peter Chittum
 
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
Peter Chittum
 
Maths Week - About Computers, for Kids
Maths Week - About Computers, for KidsMaths Week - About Computers, for Kids
Maths Week - About Computers, for Kids
Peter Chittum
 
Best api features of 2016
Best api features of 2016Best api features of 2016
Best api features of 2016
Peter Chittum
 
Streaming api with generic and durable streaming
Streaming api with generic and durable streamingStreaming api with generic and durable streaming
Streaming api with generic and durable streaming
Peter Chittum
 
Spring '16 Release Overview - Bilbao Feb 2016
Spring '16 Release Overview - Bilbao Feb 2016Spring '16 Release Overview - Bilbao Feb 2016
Spring '16 Release Overview - Bilbao Feb 2016
Peter Chittum
 
Salesforce Platform Encryption Developer Strategy
Salesforce Platform Encryption Developer StrategySalesforce Platform Encryption Developer Strategy
Salesforce Platform Encryption Developer Strategy
Peter Chittum
 
All Aboard the Lightning Components Action Service
All Aboard the Lightning Components Action ServiceAll Aboard the Lightning Components Action Service
All Aboard the Lightning Components Action Service
Peter Chittum
 
Boxcars and Cabooses: When One More XHR Is Too Much
Boxcars and Cabooses: When One More XHR Is Too MuchBoxcars and Cabooses: When One More XHR Is Too Much
Boxcars and Cabooses: When One More XHR Is Too Much
Peter Chittum
 
Dreamforce 15 - Platform Encryption for Developers
Dreamforce 15 - Platform Encryption for DevelopersDreamforce 15 - Platform Encryption for Developers
Dreamforce 15 - Platform Encryption for Developers
Peter Chittum
 
Platform Encryption World Tour Admin Zone
Platform Encryption World Tour Admin ZonePlatform Encryption World Tour Admin Zone
Platform Encryption World Tour Admin Zone
Peter Chittum
 
Salesforce Lightning Components and App Builder EMEA World Tour 2015
Salesforce Lightning Components and App Builder EMEA World Tour 2015Salesforce Lightning Components and App Builder EMEA World Tour 2015
Salesforce Lightning Components and App Builder EMEA World Tour 2015
Peter Chittum
 
Building Applications on the Salesforce1 Platform for Imperial College London
Building Applications on the Salesforce1 Platform for Imperial College LondonBuilding Applications on the Salesforce1 Platform for Imperial College London
Building Applications on the Salesforce1 Platform for Imperial College London
Peter Chittum
 
Elevate london dec 2014.pptx
Elevate london dec 2014.pptxElevate london dec 2014.pptx
Elevate london dec 2014.pptx
Peter Chittum
 

More from Peter Chittum (20)

Dreamforce 2013 - Enhancing the Chatter Feed with Topics and Apex
Dreamforce 2013 - Enhancing the Chatter Feed with Topics and ApexDreamforce 2013 - Enhancing the Chatter Feed with Topics and Apex
Dreamforce 2013 - Enhancing the Chatter Feed with Topics and Apex
 
Winter 21 Developer Highlights for Salesforce
Winter 21 Developer Highlights for SalesforceWinter 21 Developer Highlights for Salesforce
Winter 21 Developer Highlights for Salesforce
 
Apply the Salesforce CLI To Everyday Problems
Apply the Salesforce CLI To Everyday ProblemsApply the Salesforce CLI To Everyday Problems
Apply the Salesforce CLI To Everyday Problems
 
If You Can Write a Salesforce Formula, You Can Use the Command Line
If You Can Write a Salesforce Formula, You Can Use the Command LineIf You Can Write a Salesforce Formula, You Can Use the Command Line
If You Can Write a Salesforce Formula, You Can Use the Command Line
 
If you can write a Salesforce Formula you can use the command line
If you can write a Salesforce Formula you can use the command lineIf you can write a Salesforce Formula you can use the command line
If you can write a Salesforce Formula you can use the command line
 
Do Not Fear the Command Line
Do Not Fear the Command LineDo Not Fear the Command Line
Do Not Fear the Command Line
 
Don't Fear the Command Line
Don't Fear the Command LineDon't Fear the Command Line
Don't Fear the Command Line
 
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
 
Maths Week - About Computers, for Kids
Maths Week - About Computers, for KidsMaths Week - About Computers, for Kids
Maths Week - About Computers, for Kids
 
Best api features of 2016
Best api features of 2016Best api features of 2016
Best api features of 2016
 
Streaming api with generic and durable streaming
Streaming api with generic and durable streamingStreaming api with generic and durable streaming
Streaming api with generic and durable streaming
 
Spring '16 Release Overview - Bilbao Feb 2016
Spring '16 Release Overview - Bilbao Feb 2016Spring '16 Release Overview - Bilbao Feb 2016
Spring '16 Release Overview - Bilbao Feb 2016
 
Salesforce Platform Encryption Developer Strategy
Salesforce Platform Encryption Developer StrategySalesforce Platform Encryption Developer Strategy
Salesforce Platform Encryption Developer Strategy
 
All Aboard the Lightning Components Action Service
All Aboard the Lightning Components Action ServiceAll Aboard the Lightning Components Action Service
All Aboard the Lightning Components Action Service
 
Boxcars and Cabooses: When One More XHR Is Too Much
Boxcars and Cabooses: When One More XHR Is Too MuchBoxcars and Cabooses: When One More XHR Is Too Much
Boxcars and Cabooses: When One More XHR Is Too Much
 
Dreamforce 15 - Platform Encryption for Developers
Dreamforce 15 - Platform Encryption for DevelopersDreamforce 15 - Platform Encryption for Developers
Dreamforce 15 - Platform Encryption for Developers
 
Platform Encryption World Tour Admin Zone
Platform Encryption World Tour Admin ZonePlatform Encryption World Tour Admin Zone
Platform Encryption World Tour Admin Zone
 
Salesforce Lightning Components and App Builder EMEA World Tour 2015
Salesforce Lightning Components and App Builder EMEA World Tour 2015Salesforce Lightning Components and App Builder EMEA World Tour 2015
Salesforce Lightning Components and App Builder EMEA World Tour 2015
 
Building Applications on the Salesforce1 Platform for Imperial College London
Building Applications on the Salesforce1 Platform for Imperial College LondonBuilding Applications on the Salesforce1 Platform for Imperial College London
Building Applications on the Salesforce1 Platform for Imperial College London
 
Elevate london dec 2014.pptx
Elevate london dec 2014.pptxElevate london dec 2014.pptx
Elevate london dec 2014.pptx
 

Recently uploaded

Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
ayushiqss
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
Sharepoint Designs
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Hivelance Technology
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
XfilesPro
 

Recently uploaded (20)

Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 

LMS Lightning Message Service

  • 1. Lightning Message Service @pchittum | pchittum@salesforce.com Peter Chittum, Sr Director Developer Evangelism
  • 2. Forward-Looking Statement Statement under the Private Securities Litigation Reform Act of 1995: This presentation contains forward-looking statements about the company’s financial and operating results, which may include expected GAAP and non-GAAP financial and other operating and non-operating results, including revenue, net income, diluted earnings per share, operating cash flow growth, operating margin improvement, expected revenue growth, expected current remaining performance obligation growth, expected tax rates, the one-time accounting non-cash charge that was incurred in connection with the Salesforce.org combination; stock- based compensation expenses, amortization of purchased intangibles, shares outstanding, market growth and sustainability goals. The achievement or success of the matters covered by such forward-looking statements involves risks, uncertainties and assumptions. If any such risks or uncertainties materialize or if any of the assumptions prove incorrect, the company’s results could differ materially from the results expressed or implied by the forward-looking statements we make. The risks and uncertainties referred to above include -- but are not limited to -- risks associated with the effect of general economic and market conditions; the impact of geopolitical events; the impact of foreign currency exchange rate and interest rate fluctuations on our results; our business strategy and our plan to build our business, including our strategy to be the leading provider of enterprise cloud computing applications and platforms; the pace of change and innovation in enterprise cloud computing services; the seasonal nature of our sales cycles; the competitive nature of the market in which we participate; our international expansion strategy; the demands on our personnel and infrastructure resulting from significant growth in our customer base and operations, including as a result of acquisitions; our service performance and security, including the resources and costs required to avoid unanticipated downtime and prevent, detect and remediate potential security breaches; the expenses associated with new data centers and third-party infrastructure providers; additional data center capacity; real estate and office facilities space; our operating results and cash flows; new services and product features, including any efforts to expand our services beyond the CRM market; our strategy of acquiring or making investments in complementary businesses, joint ventures, services, technologies and intellectual property rights; the performance and fair value of our investments in complementary businesses through our strategic investment portfolio; our ability to realize the benefits from strategic partnerships, joint ventures and investments; the impact of future gains or losses from our strategic investment portfolio, including gains or losses from overall market conditions that may affect the publicly traded companies within the company's strategic investment portfolio; our ability to execute our business plans; our ability to successfully integrate acquired businesses and technologies, including delays related to the integration of Tableau due to regulatory review by the United Kingdom Competition and Markets Authority; our ability to continue to grow unearned revenue and remaining performance obligation; our ability to protect our intellectual property rights; our ability to develop our brands; our reliance on third-party hardware, software and platform providers; our dependency on the development and maintenance of the infrastructure of the Internet; the effect of evolving domestic and foreign government regulations, including those related to the provision of services on the Internet, those related to accessing the Internet, and those addressing data privacy, cross-border data transfers and import and export controls; the valuation of our deferred tax assets and the release of related valuation allowances; the potential availability of additional tax assets in the future; the impact of new accounting pronouncements and tax laws; uncertainties affecting our ability to estimate our tax rate; the impact of expensing stock options and other equity awards; the sufficiency of our capital resources; factors related to our outstanding debt, revolving credit facility, term loan and loan associated with 50 Fremont; compliance with our debt covenants and lease obligations; current and potential litigation involving us; and the impact of climate change. Further information on these and other factors that could affect the company’s financial results is included in the reports on Forms 10-K, 10-Q and 8-K and in other filings it makes with the Securities and Exchange Commission from time to time. These documents are available on the SEC Filings section of the Investor Information section of the company’s website at www.salesforce.com/investor. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements, except as required by law.
  • 4. Principles of Message Service Client-side event bus between DOM branches LWC, Aura, and Visualforce as Equal Citizens Don't Be Surprising (Scope)
  • 6.
  • 7. LWC, Aura, Visualforce as Equal Citizens
  • 9. Context Distinguish between different near-root level DOM features
  • 10. Scope Whether a subscriber remains active when its context becomes inactive
  • 11. Resources Learn MOAR Summer 20 Release blog: https://bit.ly/lms-launch-blog Follow the work in this github issue: https://bit.ly/lms-recipe-issue Scoped Messaging example: https://bit.ly/lms-with-scope
  • 12.
  • 13. Appendix A: All The Samples Where can I go to find other resources to learn about LMS (apart from the docs, of course)
  • 14. Internal LMS Example Inventory LWC Recipes Sample App ● LWC Publisher ● LWC Subscriber ● Aura Publisher ● Aura Subscriber ● VF Publisher ○ Page and Static Resource ● VF Subscriber (with postback) ○ Page and Static Resource ● VF Subscriber (with remote obj) ○ Page and Static Resource E-Bikes Sample App ● productTileList ● productCard ● productFilter Dreamhouse Sample App ● propertySummary ● daysOnMarket ● propertyFilter ● propertyMap ● propertyTileList Easy Spaces Sample App ● reservationHelper ● reservationList ● customerList ● spaceDesigner Trailhead Modules and Projects ● Build a Bear-Tracking App with Lightning Web Components Project
  • 15. Appendix: the LMS APIs A summary of interacting with LMS across all three Salesforce UI technologies: LWC, Aura, Visualforce
  • 16. LMS Moving Parts The message service: the reusable parts, used to publish, subscribe, etc. The message channel: a way to name and segment messages (Note: for all examples we're using the recipes in the LWC Recipes sample app)
  • 17. The above message channel would be referenced as Record_Selected__c in code Message Channel Metadata Definining a Message Channel
  • 18. Import via ES6 modules import { subscribe, publish, MessageContext } from 'lightning/messageService'; import RECORD_SELECTED_CHANNEL from '@salesforce/messageChannel/Record_Selected__c'; LMS in LWC MessageService imports ● publish ● subscribe ● unsubscribe ● MessageContext ● APPLICATION_SCOPE Message Channel ● Surfaced as an ES6 module by API name in the @salesforce module scope ● Use default import syntax
  • 19. export default class LmsPublisherWebComponent extends LightningElement { @wire(getContactList) contacts; @wire(MessageContext) messageContext; // Respond to UI event by publishing message handleContactSelect(event) { const payload = { recordId: event.target.contact.Id }; publish(this.messageContext, RECORD_SELECTED_CHANNEL, payload); } } In LWC Publishing a Message
  • 20. export default class LmsSubscriberWebComponent extends LightningElement { subscription = null; ... @wire(MessageContext) messageContext; ... subscribeToMessageChannel() { this.subscription = subscribe( this.messageContext, RECORD_SELECTED_CHANNEL, (message) => this.handleMessage(message) ); } ... connectedCallback() { this.subscribeToMessageChannel(); } In LWC Subscribing to a Message Channel
  • 21. Access via the aura <lightning:messageChannel/> component <lightning:messageChannel type="Record_Selected__c" onMessage="{!c.handleMessage}" /> LMS in Aura lightning:messageChannel attributes ● onMessage ● scope ● type One tag to rule them all ● Same tag for publishers and subscribers ● Subscription is implicit when handler specified ● Message channel specified by literal unqualified API name
  • 22. In markup <lightning:messageChannel type="Record_Selected__c" aura:id="recordSelected" /> In your controller var payload = { recordId: event.target.contact.Id }; component.find('recordSelected').publish(payload); In Aura Publishing a Message
  • 24. Access via standard Visualforce objects setPageConfigs({ messageChannel: '{!$MessageChannel.Record_Selected__c}', lmsSubscribe: sforce.one.subscribe }); LMS in Visualforce sforce.one functions ● publish ● subscribe ● unsubscribe Message Channel ● Surfaced as a global variable by API name under $MessageChannel ● Bind and assign to a JS variable
  • 25. Visualforce page setPageConfigs({ messageChannel: '{!$MessageChannel.Record_Selected__c}', lmsPublish: sforce.one.publish }); Static resource JS module const payload = { recordId: selectedIdNode.dataset.id }; _pageConfigs.lmsPublish(_pageConfigs.messageChannel, payload); In Visualforce Publishing a Message
  • 26. Visualforce page setPageConfigs({ messageChannel: '{!$MessageChannel.Record_Selected__c}', lmsSubscribe: sforce.one.subscribe }); Static resource JS module document.addEventListener('readystatechange', (event) => { if (event.target.readyState === 'complete') { lmsChannelSubscription = _pageConfigs.lmsSubscribe( _pageConfigs.messageChannel, handleLMSMessageRemoting ); } }); In Visualforce Subscribing to a Message Channel