function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Code for toast not deploying to source org in IDE

A message needs to display for the user before continuing to the next page in the sequence for an order process. The orginal code in the .js of the LWC was as follows:

handleClickContinue() {
    this.dispatchEvent(new CustomEvent('continue'), { detail: 'propertyInfo' });

and the code for the toast was inserted as follows:

handleClickContinue() {
      new ShowToastEvent({
          title: 'Test case for this & that.',
          message: 'Once an order is submitted, changes cannot be made. Please review <a href="">these policies here</a> for further information.',
          variant: 'info',
          mode: 'sticky'
    this.dispatchEvent(new CustomEvent('continue'), { detail: 'propertyInfo' });

The issue is that my code will not deploy to the source org. Is there a syntax issue here or what should I check here?