I’ve been able to do this when adding the file as ...
# suitescript
a
I’ve been able to do this when adding the file as form-level code on an existing record, but this is a suitelet for which I’m generating the form dynamically.