Salesforce Asked by Yogesh D on November 23, 2021
Is there any way to view created LMS channels from within the SF org, other than querying them from the setup menu? How do I delete the channel if I want to from the org ?
I was able to to create a LMS channel and push it to the org (using VS Code and SFDX cli) and was able to verify that the channel exists in the org by querying it from the developer console.
below is the meta file I added to create the channel
<?xml version="1.0" encoding="UTF-8"?>
<LightningMessageChannel xmlns="http://soap.sforce.com/2006/04/metadata">
<description>This is a sample Lightning Message Channel for the Lightning Web Components Superbadge.</description>
<isExposed>true</isExposed>
<lightningMessageFields>
<description>This is the record Id that changed</description>
<fieldName>recordId</fieldName>
</lightningMessageFields>
<masterLabel>BoatMessageChannel</masterLabel>
</LightningMessageChannel>
PS: LMS channels is a very new topic and I did a lot of research elsewhere (including salesforce documentations and communities) but was not able to find what I was looking for. So even a link to the right documentation would help. All the articles I have came across so far only talk about creating and implementing LMS channel from VS code.
I was able to delete message channel using sfdx cli:
sfdx force:source:delete -p ./force-app/main/default/messageChannels/BoatMessageChannel.messageChannel-meta.xml
Make sure you use exact file name (case sensitive), you can check what you have in your org in workbench: https://workbench.developerforce.com/metadataDescribeAndList.php?type=LightningMessageChannel
Answered by edelrabe on November 23, 2021
Currently, I don't see any direct sfdx command to deleting LMS from org but you can use destructive changeset to delete.
Answered by Amitkumar Katre on November 23, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP