I would try transaction then type invoice. On crea...
# suitescript
k
I would try transaction then type invoice. On create then before submit as a transform saves the record as well.