I am creating a Lightning Web Component component that needs to work with an existing Aura component. They will of course have to use events to communicate. I'm trying to follow Salesforce's documentation to use the new Message Channel to set up an event publish/subscription model of communication.
I've created a new Message Channel meta xml (ZPViewDocument.messageChannel-meta.xml) file and successfully deployed it to my development org. It looks like this:
?xml version="1.0" encoding="UTF-8"?>
<LightningMessageChannel xmlns="
http://soap.sforce.com/2006/04/metadata">
<masterLabel>View Document Event Channel</masterLabel>
<isExposed>true</isExposed>
<lightningMessageFields>
<description>Holds the zPaper Id of the Document to be displayed in the Viewer</description>
</lightningMessageFields>
</LightningMessageChannel>
I'm now trying to use that channel in my Aura component. I've added the following to my .cmp file:
<lightning:messageChannel type="ZPViewDocument__c" aura:id="zpViewDocument" onMessage="{!c.handleReceiveChannelMessage}"/>
However, when I try to deploy the Aura component, I get the following error:
Has anyone been able to get this to work?
Scott: I assume that IC is using the CLI to deploy the Salesforce resources. Is there some way to see the response that the CLI call is getting so I can see if it has more information than what is being displayed in the error dialog that I am seeing?
Thanks.