Script to update SO line pricing


A customer has asked for a way to update pricing on 1000's of SO, for some planned pricing updates they working on.  My idea was to have a button script to loop through all SO, and all lines on each SO, triggering the Sage logic to calculate each line individually (and incrementing a counter with each line change).

What I found was this:

Set oLines = oSession.AsObject(oBusObj.Lines)
retVal = oLines.RecalculateLinePricing()

It's odd that I don't even need to MoveFirst, and it seems to work, but triggers the pricing recalculation for all lines on the SO (ItemType 1 only) with no real control or way of knowing how many lines were actually updated. 

oLines.PriceRecalculation() seems to do the same thing (although I didn't look as closely at that method).

While this should technically do what the customer has asked for, I want to be prepared if they'd like a bit more control over (or feedback on) the line by line updates.

Does anyone know of another way to manually trigger the pricing hierarchy (line by line), without using the "Recalc Price" button?

As another way to get some "what has changed" numbers, before doing the header Write(), is there a record property I can check to see if there are any unsaved changes?