you have to create an user event with beforeLoad t...
# suitescript
p
you have to create an user event with beforeLoad that adds the button, and also does form.setScript('customscript_x')