I've seen some code online to handle the Action button in the SOP Transaction entry form, and none of it worked for me. Below is the code that I ended up using.
The Action button is the one that lets you Transfer, Void, Delete, etc