if the record is scriptable you just create a rend...
# suitescript
a
if the record is scriptable you just create a render object, attach the record to the rendered object, attach the template and should be fine... let me find an snippet