In a Suitelet, on POST request I am pulling the co...
# suitescript
n
In a Suitelet, on POST request I am pulling the content of the email template from a rich-text field and then creating the email template using that content. If I don't make edit to the content (on the form UI) it works fine. But if I make any edit for example add a text "thank you!" I am getting this error "The following has evaluated to null or missing: ==>" Is the rich-text messing up the content or is it something else? I have already checked SA. No luck so far.
I have investigated the issue further. NetSuite is adding additional "/" with the bracket. For example, if previous text was <a href = "" ></a>, it is now changed to <a href = "" /></a>
Any fix for this?
@battk?
b
you take your chances pretending rich text is html
n
I am using the value from rich text field. But it is not working due to the above reasons.
b
you are setting html as the default value into a rich text field
and hoping you get html out again
n
Not setting the default value. Setting it after the template is selected. Yes, I was/am hoping I will get HTML again. Is the assumption incorrect? Is there a solution?
b
rich text supports a very specific subset of html
everything that is not that subset is removed
do not expect to put a html template into a rich text field and get out html after editing it
At best, you put rich text into a rich text field and get out rich text
your approach is only sane if you created your template in the rich text field
n
The template might be created in rich-text editor of the email template.
Is there any solution to handle this? Or any other alternate solution?