I keep getting this error for this section of my s...
# suitescript
l
I keep getting this error for this section of my script: TypeError Cannot read properties of undefined (reading 'EMPLOYEE) if (currUserField == '') { var submitFieldStatus = currRec.submitFields({type: currRec.Type.EMPLOYEE, id: currRecId, values: {custentity8: userId} }) }
b
not enough code shared
you error is telling you that
Copy code
currRec.Type
is undefined
cant really tell you more without knowing what currRec is
t
also instead of using this if (currUserField == '') just try to if (!curruserField)