Hello, I have created global script parameter {cu...
# suitescript
r
Hello, I have created global script parameter {custscript_percent_complete} and trying to set value in one of the script as below. var scriptObj = runtime.getCurrentScript(); scriptObj.custscript_percent_complete = 10; Now, I am trying to get the script parameter value in another script as below and its always returning value as undefined. var scriptObj = runtime.getCurrentScript(); var percentComplete = scriptObj.getParameter({ name: 'custscript_percent_complete' });
Can anyone help me on this?
b
@raju I don't think this is possible. You can only 'get' the script parameters during script execution. You cannot 'set' them.
You may want to explore using the N/cache module to hold data.
r
Thanks @Brian Brown, will give a try using cache module
@Brian Brown N/cache will work in server side scripts only, it iwll not support client script. But I need to get and use the value in client script. Here is what I am looking for, I will set values in server side script and need to get that value in client script. is it possible ?
s
Create a Custom Record Type and store the value an a record of that type?