Hi All, We have created a suitelet using netsuite ...
# suitescript
n
Hi All, We have created a suitelet using netsuite n/ui/serverwidget and sending the form in response. form object is our response to the request but I want to add some HTML content like CSS and Javascript for the form fields and table. Is there any way to do this.
j
Heard of Inline HTML field type? Add such a field through your suitescript and inject HTML code into it. CSS must be possibe (Not sure).
n
Yes Inline HTML fields cannot be added to a sublist. We tried to add this but it says Netsuite cant support it.
s
You can manipulate parts of the DOM in a client script that fires on pageInit in your suitelet.
n
Would I be able to load some saved search data in pageinit in a hidden table
I am showing a total of opportunity won on suitelet but i want to add collpse data on the table data
s
You could certainly run the search on pageInit, it would be better performance-wise to run the search in the suitelet, and store the data you need in a hidden field, and have the client script access the hidden data when needed rather than running the search in the client.
If the search is dynamic based upon some user input, then you would obviously need to run in client.
n
The data would be a lot of data if we try do it in suitelet we would run out of governance. Thats why I thought we will load only data as per the user requests for. On certain actions in the html like collapse of button click we would call the saved search and display that data by calling a function in client script
s
That's going to be very difficult to code within the architecture of the native sublist UI.
n
I was able to do it using the inline html. For the popup i used nlExtOpenWindow(url, '', 1000, 450, '', false, "Suitelet"); This will open suitelet as a popup
338 Views