I'm getting an error when trying to schedule a sch...
# suitescript
s
I'm getting an error when trying to schedule a scheduled script in SS1.0 by calling nlapiScheduleScript inside a RESTlet. The error code I get is UNEXPECTED_ERROR the description is null and the stack trace is [Ljava.lang.String;@34eeff70 . The RESTlet is called via Token Based Auth. For more weirdness.... the code works fine when I run in the debugger. Is it a permissions/role issue? From what I have read you can call nlapiScheduleScript inside a RESTlet but maybe the docs I am reading are older. Any help is appreciated..thx
b
Is the role and user used for authentication the same you used when it worked?
s
Different user but same role. Both roles are Administrators
b
if you cant reproduce the problem, you probably want to see if you can get netsuite support to help
s
quick FYI. I opened a case with NetSuite. According to them you cannot trigger a scheduled script from a RESTlet. There is an enhancement request in for this but no timeline for implementation
Copy code
The nlapiScheduleScript API consumes 20 units per call. This API is supported in user event, portlet, RESTlet, scheduled, and Suitelet scripts.
i hope there was more going on than what you shared
s
I read that as well, but I am wondering if that was pre-mandatory Token Based Auth for RESTlets
Here's what I got form NS....
Hello Seth, Thank you for contacting NetSuite Customer Support. At this time, the feature you are requesting is not available within the NetSuite line of application services. We do have an Enhancement Request logged for this feature request and it has been updated with your account information and comments. Our Product Management team periodically reviews these Enhancement Requests and perhaps this will be available in a future release. Enhancement # - 251798   Summary: SS - please provide a stand-alone permission to invoke nlapiScheduleScript
b
that enhancement sounds like the SuiteScript Scheduling permission
SuiteScript Scheduling was introduced so that you didnt need to use an administrator to use nlapiScheduleScript
i personally was sad when it was introduced since it was a legitimate reason to be lazy and run your script as administrator