Some NetSuite Administrators commonly overlook or ignore the warning messages that pop up the first time switching from WYSIWYG mode to Source Code mode and vice versa in the Advanced Template Editor. Below are screenshots of the said warning messages:
The pop-up warnings state that switching back to WYSIWYG mode after complex edits are made in Source Code mode and saving the template would likely cause issues.
One such case is when some parts of the inserted code get modified in a way that is problematic. See the screenshots below that illustrate this scenario:
Template Source Code (edits are highlighted):
Switching to WYSIWYG mode and saving the Template:
Inspecting the code after performing the actions above, you may notice that the code was modified and became malformed as shown below:
To prevent issues like the one described above, do not switch to WYSIWYG mode after editing the template in Source code mode as much as possible. But in any case that switching is needed and you have encountered an issue, undo the modifications that are automatically made to the source code.
The common reason users switch back to WYSIWYG mode in the first place is to preview how the template looks when printed. However, the Preview option is available for that purpose, so users should utilize that option instead. See the screenshot below:
Have you encountered similar issues described here? Tell us how you got through it. Also let us know what you think about this topic by leaving a comment or using the reaction buttons below.
-Jack