have you tried logging the scriptContext.type to c...
# suitescript
j
have you tried logging the scriptContext.type to check that it's CREATE or EDIT?