that should give you an idea.. that would be for a...
# suitescript
e
that should give you an idea.. that would be for a userevent beforeSubmit script on the item