For the new Project page they seem to have disable...
# suitescript
t
For the new Project page they seem to have disabled suitescript 1.0 and also started limiting what you can put into inlinehtml field. Has anyone found out how you can add script tags into inlinehtml in the new pages? I think they now sanitize it all. Good in practice but it limits my ability to load 3rd party libraries with a hidden field that has <script src="3rd party url">
c
I just ran into something similar. You can't set inline html fields (like a link to a record for example) client side. If you set it server-side, you're OK.
its new in the latest release
t
I can set html elements but any javascript in the inline text field doesn't execute
Seems to revolve around the <script> tag so links and even css <link> tags still seem to work
b
use client script
t
use client script?
If I add the script tag to the body via a client script it doesn't seem to work. Something to do with it adding the tag but it being after the document has loaded its assets
Do you have example code that you've seen work?
b
ideally, add the script as a custom module that you use in your client script
t
I've tried that, the AMD loader that netsuite uses doesn't work with this library. I gotten that to work with other libraries like openPGP but doesn't seems to like mine
There is some detail on a configuration.json you can do to get non-amd modules to work but its very confusing
b
usually you can use a require configuration, specifically a shim
the majority of the time you only need to setup the exports of the shim
t
You have an example of that I could take a peak at? Highly redacted or otherwise?
b
nothing really useful beyond the configuration, which is just an example of a exports
Copy code
{
  "shim": {
    "/SuiteScripts/oauth-1.0a": {
      "exports": "OAuth"
    }
  }
}
t
so I might have taken a hard right here and went with an iFrame which isn't blocked by netsuite
so I have an iframe load a suitelet which loads a script tag because that is the easiest way to get netsuite to load my library
😑 1