Anyone know if there is a limit to the number of p...
# suitescript
j
Anyone know if there is a limit to the number of parameters sent to a suitelet via a URL? When I log it, it shows me the first five and nothing after that. Trying to determine if a limit is my problem or formatting. The parameters do show up in the URL just not in logging/getting the info into a variable.
d
shouldn't be a limit what's your actual Url and the code snippet you are using to log, if you can share
s
it may be you need to url escape something
j
I found one issue. It is a button and I was using button as a parameter as well. Updated that and now I have more than five parameters logging. But there is still one that isn't. It has a dash in it (the document number). Is there a way to URL escape for a field? In the inline html below, it is the docnum={name}...
Copy code
'<button id="custrecord_apsw_home_templateupload"> <a href="#" onclick="openSuiteletA()">Click here to upload.</a></button><script>function openSuiteletA() {window.open("/app/site/hosting/scriptlet.nl?script=718&deploy=1&buttonID=1&internalid=' || {id} || '&custname=' || {custrecord_apsw_customer} || '&custid=' || {custrecord_apsw_customer.id} || '&docnum=' || {name} || '", "popup", "width=320, height=320"); return false;}</script>'
In this case, {name} returns a value like "ABC-123"
s
I would recommend using url.resolveScript and passing the parameters in that way, its much more readable
💯 1
j
Can I do that in an inline HTML field?
Would I just put it in the <script> tags?
s
You could just call to get the url before setting the value in the inline html field and give it to it. Or you would probably need to get the url module inside the html call like you would in the dev console of browser
c
There is a string character count limit though in the URL parameters. It will error out if too much text is sent.