here is a function i wrote to do that a while back...
# suitescript
a
here is a function i wrote to do that a while back (1.0 only, sorry)