You need to sign in to do that
Don't have an account?

Pass emailTemplate.Body to lightning-input-rich-text
I tried to use the EmailTemplate object to get my template by id, but I get the error "Illegal assignment from List <EmailTemplate> to List <EmailTemplate>". Maybe there are other ways?
List<EmailTemplate> emailTemplate = [Select Subject, Body FROM EmailTemplate where Id='TemplateId'];
Thank you in advance!
All Answers
As I can see your given query is absolutely perfect considering that TemplateId will be replaced by the Id of the email template. You can check the below screenshots for the reference that is showing the query is working properly.
Query :
Result :
You must check the following points for your problem:
- Template Id is being replaced by a proper Email template Id.
- Error line number by using try-catch.
- You can use EmailTemplate object in place List of EmailTemplate.
Please mark it as the best answer if it helped you.Thanks.
Your code is almost correct , please update with below code
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh