Muhammad Kamran
07/03/2025, 6:38 PMCeligo AI
07/03/2025, 6:38 PMAI generated answer (using internal Slack threads):Yes, it is possible to use JavaScript in a portlet in NetSuite. However, there are some limitations and considerations to keep in mind. NetSuite does strip out script tags from an inline HTML portlet, which can make it difficult to use JavaScript directly within the portlet. However, there are ways around this. One option is to use a Simple Form Portlet, which behaves similarly to a Suitelet form and allows you to add inline HTML fields and attach a client script. This can be achieved using the
Portlet.clientScriptModulePath
and Portlet.addField
methods.
Another option is to use a Suitelet via an iframe, which also allows you to use an Inline HTML Portlet. However, this method also has the same limitation of NetSuite stripping out script elements.
Please note that while these methods can allow you to use JavaScript within a portlet, they should be used with caution due to potential security risks, such as XSS attacks.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
07/03/2025, 6:39 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.851989925
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.841754079
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.838405967
Celigo AI
07/03/2025, 6:39 PM