-
-
Save arun12209/27486e2a7d62f2c39d718b37cd0c1421 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { LightningElement } from 'lwc'; | |
import { MessageContext, publish } from 'lightning/messageService'; | |
import ACCOUNT_SELECTED from './accountSelected.js'; | |
export default class MyComponent extends LightningElement { | |
@api recordId; | |
handleAccountSelect() { | |
const message = { recordId: this.recordId }; | |
publish(this.messageContext, ACCOUNT_SELECTED, message); | |
} | |
connectedCallback() { | |
this.messageContext = MessageContext.getInstance(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment