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
CD
01/04/2022, 7:12 PM
Are you saying that it is caching the old code?
t
Tim Johnson
01/04/2022, 7:13 PM
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
CD
01/04/2022, 7:18 PM
You need to share code or any error messages then, as I don't understand
t
Tim Johnson
01/04/2022, 7:23 PM
{“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}
Tim Johnson
01/04/2022, 7:24 PM
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
battk
01/04/2022, 7:35 PM
that doesnt sound like the usual behavior of errors
battk
01/04/2022, 7:35 PM
i would probably look for something that is running on a schedule that is changing the record