Does anyone know what this error may mean for a sc...
# suitescript
k
Does anyone know what this error may mean for a school (custom) record? "com.netsuite.suitescript.scriptobject.ScriptNullObjectAdapter@104a2e0a"
c
Do you know what line is triggering the message?
k
@Clay Roper no there is no line message. The error is through the system
c
What I mean is: do you know what line of Suitescript code is causing the error? From your earlier screenshot, it's logging in a specific script, right?
k
I know its beforeLoad on a user event script
@Clay Roper Do you want to see the code?
c
Why not? It might not help without knowing how far the code gets in its execution before the error is triggered.
k
UpdateFieldSchoolUE.js
c
Did this script work without erroring at any time before?
k
Yes
c
What changed?
k
I works on all other school records except for a certain school
I have not personally changed the code and there is no record of fields being changed
c
Does that certain school have an empty/null value for one of the fields being searched or changed by this script?
k
No all the fields are populated. There are no extra fields or fields that are null that should not be
c
Have you filed a ticket with NS support?
k
No, I have not. How do I start the process?
c
Depending on the support your company does / does not pay for, you can either call them, or more likely, create a support case (option on the right)
b
its a suitescript 2.1 thing
rewriting the script to use 2.0 instead usually fixes the issue, or at least gives a better error message
c
I've seen that as the recommended solution, which is a bummer. Any idea what causes it @battk?
b
the job of suitescript apis is to call a matching java method, suitescript 2.1 has a bug doing so. going from the name of the class, null related
w
Some notes to your script (probably not the cause of the error): • N/currentRecord-module is for client scripts • It's pretty unusual to do a bunch of record updates on beforeLoad. It would execute every time you view a record. • You have an empty afterSubmit-function, I'd delete that and the reference to it from the return statement. • I wouldn't name a variable customerId if it really is an itemId (or just remove the variable statement entirely and reference result.id directly in the record.submitFields()-function) • Both the beforeLoad and beforeSubmit does the same thing, consider refactor it so they call common functions instead
n
To identify the issue, start by removing the code for search and submitFields. See if that works. Then add all the search code WITHOUT columns and see if all code works. Then add columns. Then add submit field code. Also, log the error using .error method and not the .debug method like you have done: log.debug("Error", error)