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
battk
01/24/2022, 2:15 AM
not enough code shared
battk
01/24/2022, 2:15 AM
you error is telling you that
Copy code
currRec.Type
is undefined
battk
01/24/2022, 2:16 AM
cant really tell you more without knowing what currRec is
t
Tyn Guardian
01/24/2022, 2:23 AM
also instead of using this if (currUserField == '') just try to if (!curruserField)