happy friday! are there any tricks regarding usin...
# suitescript
l
happy friday! are there any tricks regarding using multiple modules in suitelet? is there a limit? for testing purposes, I have this simple suitelet gets a url and writes to log. it works. but if I insert it in another working suitelet using bunch of other modules, it doesn't. the url module cannot be used here. I get a resolveRecord() not found. in vscode, the "url" shows different color than others. anyone knows what this is about? thanks.
r
I don't think there is any limit to including a limited number of modules as I have used so many modules in a single script. Try changing the sequence of modules.
l
changing sequence didn't make any difference. 🤔
r
Put URL in place of TASK module and TASK module in place of URL to see if it is only url module which is causing the issue or what
l
same result. vscode knows something i don't. url is in different color.
see xyz is in different color like a variable.
r
vscode gives a different color to variable when it is not in use.
Here the error is different. You need to check whether you have included the module which you are using with serverWidget name in your script.
l
sorry I copied the wrong line.
r
The url module does not look like it's being used in your entry point function, which makes me wonder if
onRequest
is your entry point function. What is the script returning?
l
r
ok so not that. that is the very end of the script in that image, right?
nothing but whitespace after that?
l
yeah. if I remove these lines from this form, it works fine using all the other modules.
r
url is already being used for a variable name then
l
omg. @reptar you rock
didn't think of that
r
i know i know lol
l
confirmed. mystery solved
💯 1
chatgpt generated some of the code blocks. i just pasted in.
🧐 1
r
yea you gotta keep that namespace clean, friend
1
1
l
what a newbie error
❤️ 2
r
everybody's gotta start somewhere
1