assuming the error is coming from the line where c...
# suitescript
b
assuming the error is coming from the line where currentCase is defined, your error is telling you that rec_type is not being set correctly