Hi All, I am passing parameters to my scheduled sc...
# suitescript
p
Hi All, I am passing parameters to my scheduled script from the parameters tab in backend were my script is uploaded. In SS1 I used to do it like this var script = nlapiGetContext().getSetting('SCRIPT', 'custscript_name’); and it used to work fine. Now I’ trying it in SS2 and I’m getting value as null var script = runtime.getCurrentScript(); var sap = script.getParameter({name: 'custscript_name’}); Please help!!
d
This s correct API in 2.0
p
But I'm getting the value as null
d
Did u cross check script deployment, have u provided any value on that field
I mean the parameter
p
just the parameter that i want
Its the website record
n
double check the parameter internal id and that it has a value. Otherwise that seems fine.
☝️ 1
p
which value are you referring to
I guess i may have missed that
n
the parameter value you're checking, have you even set it? D17339 mentioned this previously actually.
p
Yes i have set it
i selected the type as list/record and in list/record dropdown i selected website
Is there anything else that we need to do?
b
try including a screenshot of the deployments parameters in ss1 vs that of ss2
at the very least, i would have expected the id and name of the parameter to change
p
Its working now. In my scripts deployment record there was no value set for that parameter. Thank you all😀
👍 2