from what Ive seen this can be done via for.addbut...
# suitescript
p
from what Ive seen this can be done via for.addbutton