FYI, I had to change gr.addQuery('document_id', current.sys_id); to gr.addQuery('document_id', current.document_id); (not to mention changing gs.print to gs.addinfoMessage) to get this to work.  But this was VERY helpful, thanks!