/LWCComms

To demonstrate Communication using LMS , Platform Event and VF in an Iframe in Lightning Experience using LWC

Primary LanguageJavaScriptMIT LicenseMIT

LWC Communications

The App in this Repo demonstrates Communication scenarios -

  • Using Lightning Message Service between LWC, Aura Component & VF page publishers and listeners
  • Firing Platform Events between LWCs, and
  • LWC containing VF in an iframe

Scenarios

⚡ Using Lightning Message Service between LWC, Aura & VF ⚡

✨ Firing Platform Events between LWCs ✨

⭐ LWC containing VF in an iframe ⭐


Installation / Deployment

You can simply Install this Unmanaged Package in your target Org Use login.salesforce.com for DE orgs, use test.salesforce.com for Sandboxes.

If Unable to Install using above method, Kindly follow below steps to deploy the contents of this repository in your Developer Edition Org or a Sandbox.

  1. Clone this repository in your local machine:

    git clone https://github.com/sfwiseguys/LWCComms
    cd LWCComms
    
  2. Authorize your org and provide it with an alias (example mydevorg in the command below):

    sfdx force:auth:web:login -s -a mydevorg
    
  3. Run this command in a terminal to deploy this app in your Org

    sfdx force:source:deploy -p force-app
    
  4. If your org isn't already open, open it now using this command:

    sfdx force:org:open -u mydevorg
    

Post Installation / Deployment, navigate to App Launcher, select the LWC Comms app to view the Three Tabs -

  • LMS POV - to see Lightning Message Service scenarios
  • EMP API POV - to see LWCs listening to a Platform Event Channel
  • POV LWC to VF in iFrame - LWC containing VF in an iframe, communicating to each other

Authors


Support

Reach out at one of the following places!


License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgements

  • ☁️ Salesforce Blogs on LMS & LWC Communication with Events
  • ☁️ Salesforce Documentation and Examples