This topic contains 4 replies, has 0 voices, and was last updated by david.smith 7 years, 5 months ago.
-
AuthorPosts
-
June 1, 2017 at 5:59 pm #5542
savethepenniesProbably like others, we have a script that used jQuery UI. While that has not been officially supported in the past, it also was not officially blocked. Our scripts used jQuery to add script resources to the page like so:
[js]var resources = [
‘https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js’
];for (var i = 0, count = resources.length ; i < count ; i++) {
jQuery(“head”).append(“<script type=’text/javascript’ src='”+resources[i]+”‘ /></script>”);
[/js]That allowed us to import libraries needed in the script that weren’t already included. Now that jQuery UI is not included by NetSuite it must be imported independently. The method has been working fine for years but now seems to have no effect. This of course causes subsequent calls to fail and that’s how I discovered it. Is this no longer possible? Did the 2017.1 release notes leave that out?
I’m hoping I’m not alone in this and someone has worked around it already.
This is a cached copy. Click here to see the original post. -
June 1, 2017 at 6:48 pm #5543
michoelHave you tried added the file as a library to your Script Record?
-
June 1, 2017 at 9:11 pm #5544
chanarbonAgreeing with michoel , the general requirement to address this is by having the jqueryUI libraries into the library sublist of the client script. If you are using Suitelets, then it should also be linked to the client script record’s libraries sublist.
-
June 2, 2017 at 11:10 am #5545
savethepenniesI had not tried using library files as I was hoping to use the cdn hosted versions. I’m trying that out now though based on the feedback. Seems to work at least for the jquery ui file so thanks for pointing that out.
Is there a solution for css files?
-
June 2, 2017 at 11:31 am #5546
david.smithI created an HTML file with the links in the file cabinet. Most of the time I use it for the dialog box so I also included the DIV for that.
Code:
Then in my user event before load scripts I just load it to the page in an inlinehtml field. Works great.
Code:
var dialogFld = form.addField({
id : ‘custpage_jqueryui_dialog’,
type : serverWidget.FieldType.INLINEHTML,
label : ‘Dialog’
});
dialogFld.defaultValue = file.load({id:’SuiteScripts/SWK/jQueryUI_dialog.htm’}).getContents();
david.smith replied on 06/02/2017, 11:33 AM: NOTE: The above code is SuiteScript 2.0. I just realized this is the SS1 thread.
-
AuthorPosts
You must be logged in to reply to this topic.