it should look something like this: `url.resolveS...
# suitescript
s
it should look something like this:
url.resolveScript({ scriptId: 'customscript_scriptid', deploymentId: 'customdeploy_deployid', params: { id: 12345 } });
👍 1
m
uh, i didn't notice at first, but this doesn't do what I am looking for either. For this to work, I need the id in the Suitelet script, but the id is being appended to the URL via a Scheduled Script that sends the email to vendors. I am thinking that the way I am doing this I'll have to add a client script to the Suitelet Script to access the window? Or, just totally change my approach. Thanks
s
The params object translates the key-value pairs into
&key=value
, so this should have the same effect as appending
&id=12345
to the Suitelet URL. It should achieve the same result. What url are you trying to append
&id=12345
to? the Suitelet, or something else?
m
yes, to the Suitelet. So the email is going to vendors who are supposed to be able to access the Suitelet without being logged-in. So I generate the list of POs and their sublist data for the email body. From the email, they can click on a link that takes them to the Suitelet, so I append the
&id=12345
to the Suitlet URL in the Scheduled Script that sends the email
context.request.parameters in the Suitlet has what I need . 🤦‍♂️ I thought that was only bringing back the set params and not the appended ones, so... this was way simpler than I thought. SS newbie.. thanks again for your help
s
Sure!
context.request.parameters
is indeed useful in a suitelet, allowing you to read in any of the query parameters, even ones added outside of netsuite, which can be very handy