You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create lightning platform show toast event/dispatchEvent where display toast message with hyperlink click button and navigate to external link in Salesforce lightning web component LWC
#56
Open
vijayk3327 opened this issue
Jul 15, 2023
· 0 comments
In this post we are going to learn about how to Create lightning platform show toast event/dispatchEvent where display toast message with hyperlink click button and navigate to external link in Salesforce lightning web component LWC
→ Get source code live demo link:-
Step 1:- Create Lightning Web Component : lwcToastEvent.html
`
Show Toast Event and Navigate to RecordPage in Lightning Web Component (LWC)
Step 2:- Create Lightning Web Component : lwcToastEvent.js
` import { LightningElement } from 'lwc';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class LwcToastEvent extends LightningElement {
}`
Step 3:- Create Lightning Web Component : lwcToastEvent.js-meta.xml
<?xml version="1.0" encoding="UTF-8"?> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> <apiVersion>45.0</apiVersion> <isExposed>true</isExposed> <targets> <target>lightning__AppPage</target> <target>lightning__RecordPage</target> <target>lightning__HomePage</target> </targets> </LightningComponentBundle>
The text was updated successfully, but these errors were encountered: