• Sudheer Kumar 134
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies

Hi 
I am having an issue that, if i click on lwc button it is showing success toast message if there was an exception also, Iam able to see that error in logs  it is not catching the error. This always gives me an error on the console as "Uncaught (in promise)" and with the details of the exception. How can I catch this exception in a handled way.

here is my code

JS.

sendcomm({ recordId: this.recordId})
                try{
                    this.showToast('Success!', 'Communication sent successfully.', 'success', 'dismissable');
               
                }catch(error){
                    console.log('$#$#'+error.body.message);
                    this.showToast('Error!', 'error.body.message', 'error', 'dismissable');
                };
                this.handleIsLoading(false);
            }

Any help will be appreciable, thanks in advance

If ' Disposition' field is 'Not Retained'  and 'sub-disposition' is 'Transfer'
then Manager will be shown below fields
1) abc
2) xyz

need to create lwc for this can anyone please help how to go about this

Thanks and regards
Sudheer