stb-kslater3 / Admin_Checklist

Tool used by Sales Team to determine Quotes, and other things
0 stars 0 forks source link

Saving has Uncaught Exception #10

Closed stb-kslater3 closed 3 years ago

stb-kslater3 commented 3 years ago

When I go try to save, there is an uncaught exception. I have catches all over the place, so I think that the issue is coming from one of the conditionals that is using displayError or displaySuccess, because I did have an issue with the body on those so I will surround them with try catches since they didn't have catches and see if that leads me to the problem.

stb-kslater3 commented 3 years ago

That was the problem with the Uncaught part of the Exception. Now that I have the Exception, I know that the problem is that I must be using the constructor wrong, because when I go to dispatchEvent to display the toast and what not, it says templateContext has no dispatchEvent function.

stb-kslater3 commented 3 years ago

Yep, turns out the toast documentation uses this.dispatchEvent, but I was using this.template.dispatchEvent, which apparently worked in RSPilot but not in production, so I didn't catch it until now.