2

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 works and I am able to see the data. But not across tabs.

Do you guys know how I can do that?

6
  • The only components that can listen to the lms are the ones which are rendered, others do not exist until you switch the tab, you might need an intermediate storage, check out sessionstorage where you can put the values and when switching tab the components can read data from sessionstorage. Commented Feb 19, 2021 at 5:28
  • The only components that can listen to the lms are the ones which are rendered, others do not exist until you switch the tab, you might need an intermediate storage, check out sessionstorage where you can put the values and when switching tab the components can read data from sessionstorage. Commented Feb 19, 2021 at 5:29
  • Thanks. So what can I use for communication between components which are not even on the same system? Commented Feb 19, 2021 at 10:58
  • 2
    For the components which are not on same machine you need to go with platform events. Commented Feb 20, 2021 at 3:06
  • 1
    Is this for a standard nav app? Or a console app? This is technically possible, however in practice really only works if a tab has been visited at least once. You also need to make sure that your subscriber uses APPLICATION scope.
    – pchittum
    Commented Mar 4, 2021 at 11:58

1 Answer 1

3

For the components which are not on same machine/browser tabs you need to go with platform events. They as as the name suggests, propogated throughout the platform and will be listened by any of the subscribing mechanisms.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .