It seems like whenever I execute a scheduled scrip...
# suitescript
t
It seems like whenever I execute a scheduled script and a USER_ERROR occurs during the script execution, even if I go back into the code and address what caused the error I cannot have a successful script execution for hours at a time. Can anyone shed any light on what might be happening behind the scenes in NetSuite?
c
Are you saying that it is caching the old code?
t
I don’t think it is, though that could be a possibility. I hard refresh before the re-execution. And it seems like time and time alone fix this issue
c
You need to share code or any error messages then, as I don't understand
t
{“type”“error.SuiteScriptError”,“name”“USER_ERROR”,“message”:“You must enter at least one line item for this transaction.“,”stack”:[“anonymous(N/serverRecordService)“,”<anonymous>(/SuiteScripts/ccc_ss_update_expense_report.js:250)“],“cause”{“type”“internal error”,“code”“USER ERROR”,“details”“You must enter at least one line item for this transaction.“,”userEvent”null,“stackTrace”[“anonymous(N/serverRecordService)“,”<anonymous>(/SuiteScripts/ccc_ss_update_expense_report.js:250)“],“notifyOff”false},“id”“”,“notifyOff”false,“userFacing”false}
That’s the error code. I just logged out of my account and logged back in, ran the script and it went through successfully. (At least I have that solution) but it would still be helpful to know why a user error essentially halts other future script executions for a time
b
that doesnt sound like the usual behavior of errors
i would probably look for something that is running on a schedule that is changing the record