looks like a scope issue, its not clean, but you c...
# suitescript
l
looks like a scope issue, its not clean, but you could try put the function on window.myFunction =