I've got a similar script I wrote for someone else...
# suitescript
k
I've got a similar script I wrote for someone else recently which edits child records in the background after the parent is saved, by sending it off to a map/reduce script