Mike Casey
09/17/2024, 1:16 PMCeligo AI
09/17/2024, 1:17 PMAI generated answer (using internal Slack threads):Based on the conversations, it appears that you cannot directly access a client-side script on a dashboard view in NetSuite. However, there are some workarounds that you can consider: 1. You can use a Simple Form Portlet, which is implemented in an iframe and has access to require. This allows you to load
N/
modules on the home dashboard. However, you need to use the parent if you want access to the dashboard window.
2. Another approach is to use a combination of a simple form portlet, client script, HTML page, and a Suitelet. The HTML page can be used as a template for the layout display which has placeholders that you replace actual values with after making a call to the Suitelet. The portlet is just a loading mechanism and all the work is done on the client script. One caveat is that the portlet can't be collapsed, otherwise the client script won't fire.
3. You can also consider manipulating the form to include an inline HTML field that loads a script. For example, you can use the following code:
code
form.addField('custpage_revised_total_js', 'inlinehtml', '', null).setDefaultValue('<script src=XXX\"></script>');
Then from your script run jQuery.(document).ready, from there you can use nlAPI.
Please note that these are workarounds and may require a lot of 'hacking'.
******
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
09/17/2024, 1:17 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.834370911
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.833705366
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.828991175
Celigo AI
09/17/2024, 1:17 PM