at first blush I'd lean towards encapsulating your...
# suitescript
s
at first blush I'd lean towards encapsulating your SS1 logic in a suitelet/restlet