User Defined Script - Changing Detail Fields On Table Write

SOLVED

I'm trying change sales order detail lines upon the user clicking Accept of a Sales Order.  

For example, the script below is supposed to override all the quantities, and set them to 1.  

    Set oLines = oSession.AsObject(oBusObj.Lines)

    oLines.MoveFirst()

    Do until oLines.Eof

        result = oLines.SetValue("QuantityOrdered", 1)

        oLines.MoveNext()

    Loop

    ' result = oBusObj.Write()    ' Tried with and without this line

What winds up happening is nothing at all.  It just ignores these changes, closes, and when you open the Order back up, nothing has changed.

I've tried hooking into Table PreWrite and PostWrite.  I also tried calling Write on the oLines object (error thrown).

The reason I need to do it upon table write, and not just the QuantityOrdered column's pre-validate, is that the former method won't handle exploded kit items.  

Thanks!