Questions tagged [lightning-message-service]

Questions related to the Lightning message service when communicating across DOM between Visualforce pages, Aura components, and Lightning web components, including components in a pop-out utility bar.

Filter by
Sorted by
Tagged with
0
votes
1answer
19 views

'sforce is not defined' on Visualforce page when trying to publish with LMS

I'm trying to use the lightning message service on a visualforce page. To simplify things, I'm using the exact code supplied by Salesforce with the one exception I've updated the SAMPLEMC variable to ...
0
votes
1answer
42 views

Is lightning message channel package-able

I have used the lightning message channel in LWC and I want to package the same. But lightning message channel is not available in the list. Also, the component available in the managed pacakge ...
0
votes
1answer
62 views

How to Pass the Data from One LWC to Another LWC during Navigation when using Lightning Messaging Service

Requirement: I want to pass the data from One LWC to another LWC. Both LWC are not on the same page but added in Different Tab. So, when I pass the Data from LWC lmsNavComA, I should expect to see the ...
0
votes
1answer
27 views

What are the risks of using LMS on an Experience Cloud Site, and is it on the Roadmap to be GA?

Currently I have a few components that use the Lightning Message Service, but I realize that this feature is in beta for Experience Builder sites. As of right now, my components seem to work as ...
0
votes
0answers
35 views

Send message from aura component to JS app onInit

I embedded a JS application into my aura component. I would like to send a message containing a product info from aura component to my JS app <aura:component controller="Controller" ...
0
votes
1answer
57 views

Publish/Subscribe Message Service VS Parent to Child LWC

Quick theoritical question. I've read about the lightning message service communication between Lightning Web Components and it was specified that this type of communication is between unrelated ...
1
vote
1answer
72 views

LightningMessageChannel error

I'm trying to do some trainning for LWC using LMS, but when I push my source I get below error org.auraframework.throwable.AuraRuntimeException: Unable to retrieve metadata for descriptor: markup://c:...
2
votes
1answer
162 views

Communication between two child LWC Components

What is the best way to realize bi-directional communication between two LWC components. Is it better approach to pass values throught parent component or use Lightning message service? Dispatch ...
0
votes
0answers
37 views

Events between components not on the same system

As the question goes, what can I use to communicate between 2 LWC components which are accessed by different users? I am trying to build a Sprint planning poker app in LWC, where the vote submitted by ...
0
votes
1answer
96 views

Communicate across tabs in LWC using Message service

I am trying to send info across components which are not on the same lightning page. They are on different tabs of the App. When the components are placed on the same page, Lightining message service ...
2
votes
0answers
166 views

Odd Error Returned When Using Lightning Message Service in LWC - WindowMessengerNoConnectionError

This is my first time using Lightning Message Service. I set it up following the directions on this standard documentation page. After setting this up I am able to communicate between two lightning ...
1
vote
1answer
24 views

Alert on account page for a new note being added

I want to be able to create an alert that is displayed on the account page whenever a new note is added. I've seen the Lightning Message Utility managed component in appexchange (https://appexchange....
1
vote
1answer
97 views

sforce.one not available in VF page used as CTI adapter

We are using a VF page as a CTI adapter. It does not seem to include sforce.one. I notice on other VF pages this is brought in as part of api.js, but I cannot put my finger on what it is about that VF ...
0
votes
0answers
9 views

Why define lightningMessageFields in Lightning Message Service? [duplicate]

I am wondering something. In the XML file of a lightning message channel I can specify lightningMessageFields or I can omit this. Either way messages on the channel function correctly whatever you put ...
1
vote
1answer
73 views

What is the real use of “lightningMessageFields” while using LightningMessageChannel

I was thinking - while publishing or subscribing to a LightningMessageChannel, the payload has to be in some way match exactly to the names or fields defined in the lightningMessageFields XML ...
0
votes
0answers
144 views

LMS throwing :sorry to interrupt error[invalid message context]

I am trying to publish a message form lWC , but getting error as below: lightning/messageService: invalid message context] i have created the message channel file added it in the package.xml and ...
0
votes
0answers
33 views

Sending message from AURA to LWC

I have a requirement to send messages from Aura component to an LWC component. The component exist on the The Aura Component contain an LWC inside it,, i need if the tab of Aura is open the i need to ...
3
votes
1answer
124 views

Lightning Messaging Service: sforce.one not defined

I am using Lightning message service to pass message from VF page to LWC. VF page is in iframe and I am using this method to publish message sforce.one.publish(CHANNEL, message); However I am getting ...
0
votes
0answers
88 views

LWC - Community Cloud - Different Pages - Communication

I have set up a Community and now I am faced with the problem that two LWC's are on two different Community sites and these have to communicate with each other. Unfortunately this is not possible with ...
0
votes
0answers
380 views

LWC LMS: Invalid message context error

I ask this question because I did not find any similar. My error is "invalid message context". I will explain it graphically. From tab 1, I create a record, with a navigation mixin, I am ...
1
vote
0answers
54 views

Including Lightning Message Service in Managed Package?

I am attempting to make use of the Lightning Message Service to pass events between components when various actions occur (e.g. Sending an email, or authenticating the app. The Salesforce docs suggest ...
1
vote
1answer
478 views

Lightning messaging service communities support for guest users

We are working towards building a community where we have the need to communicate with different parts of the page built with LWC and Aura. Since salesforce launched lightning messaging service we ...
0
votes
0answers
35 views

How do i get the new lightning message service to work with local development server

I have a very simple lightbox component for LWC and am using lighting message service to open and close it as necessary. When I deploy the components to my sandbox it works just fine, BUT when I open ...
2
votes
0answers
140 views

Trying to publish Lightning Message Channel from Visualforce page and getting error `Sfdc is not defined`

I am trying to publish a message from a visualforce page into a lightning component and my visualforce page is not able to publish. My Visualforce code : <apex:page applyBodyTag="false" ...
2
votes
2answers
244 views

Not able to use LMS in VF page iframe in Aura Component

I want to use LMS to publish data from the VF page and receive it in Aura Component. I have an Aura Component and am trying to iframe a Visualforce page in it. <aura:component> <iframe src='/...
0
votes
0answers
103 views

Receiving error “Cannot convert a Symbol value to a string” at @wire (MessageContext)

I am getting an error while publishing message from one web Component: [error = TypeError: Cannot convert a Symbol value to a string at], it occurs while receiving MessageContext using @wire(...
2
votes
1answer
153 views

ways to create LightningMessageChannel in Salesforce

I know we can create LightningMessageChannel using package.xml but is there any quick way to create it? Any UI alternative would be far better than package.xml route.
0
votes
1answer
94 views

Visualforce to Visualforce Lightning Component Communication - postMessage not received

I have two visualforce page lightning components on a lightning page. I am unable to get them to communicate, there are no logs to the console and no errors to report. The posted messages are not ...
2
votes
0answers
324 views

Lightning Message service error in visualforce page - Cannot read property 'subscribe' of undefined

Was anybody able to work with sforce.one.subscribe for subscribing to lightning message service in visualforce? I keep getting below error: Even after including sforce and ajax js files, sforce.one ...
0
votes
1answer
246 views

Lightning message service(Build a Bear-Tracking App with Lightning Web Components)

When I am making a bear tracking app this problem arises in the last module. Error - afterRender threw an error in 'c:bearMap' [lightning/messageService: The scope property is required. When you call ...
0
votes
1answer
197 views

In Aura Components, is it possible to subscribe and unsubscribe to message channels?

Currently I'm playing around with the Lightning Message Service. I've noticed tha online tutorials for using LMS with both VisualForce and Lightning Web Components demonstrate publish, subscribe, and ...
3
votes
1answer
133 views

How to use LMS & EMP-API in the same LWC component

As both empApi and LMS require the import of the subscribe and unsubscribe methods. How can you use both within the same component? import { subscribe, unsubscribe} from 'lightning/empApi'; import { ...
1
vote
1answer
92 views

Listening to LMS messages from a background utility bar item

I want to do some background processing so I wrote a background utility bar item, and tried listening to LMS messages, but it didn't work. Then I found this: It is a front-end service that works in ...
0
votes
1answer
175 views

Lightning Message Services (beta) - no response

I tried playing around with Lightning Message Services as per the release note. Created a LWC to publish message on the message channel, and a VF page to listen to it. Also the other way around. I am ...
3
votes
1answer
831 views

Send message to aura components from lwc

I have a requirement to send messages from LWC component to an Aura component. The component exist on the page independently, i.e LWC is not embedded in an aura component. The components are in a ...