You probably want to read the docs on user events ...
# suitescript
b
You probably want to read the docs on user events closer