Loop through lines and check box while still on Lines tab in SO Entry

I'm trying to write a script that will loop through all the lines of an order and put a check mark in a UDF.  The trouble is that this doesn't seem to work with the oBusObj because the EOF is always false.  Is there a way to accomplish this without having the script run on the SO_SalesOrderHeader?