add the button with a User Event - attach or embed...
# suitescript
t
add the button with a User Event - attach or embed script to the button click via addButton parameters - and then you could have code on the client to create the JE, or a more forward thinking solution is to create a suitelet to create these JEs