Prevent Shipping Data Entry Shipment

SUGGESTED

I'm trying hard to make this happen, but falling short.  I need to prevent a sales order from being shipped if a certain condition is met.  Ideally this would occur as soon as the sales order number is specified in shipping data entry (SalesOrderNo PostValidate event).  The concern with preventing it using the table PreWrite event is that the event would not fire until after the shipment is processed in Starship (using the Starship Link).

The SalesOrderNo PostValidate event fires as expected, but my oScript.SetError call does not trigger an alert (confirmed via trace window its being called), nor does it 'invalidate' the SO value and cause the shipment record initiation to fail. I've tried the following alternatives:

1.  Attached a script to the PostValidate event for the QuantityShipped on the detail object - script runs and oScript.SetError is called (confirmed via trace window), but no alert is generated, and quantity shipped value is accepted.

2.  Attached a script to the PreWrite event for the detail object - script runs, but prevents lines from being written during the copy of the sales order lines after salesorderno is specified resulting in no lines and a shipment that is in limbo (cancelling leaves the record out there and the sales order's 'currentinvoicenumber' still set).

3.  Attached a script to the PostValidate event on the SalesOrderNo - generated my own notification via MessageBox, disabled the 'Accept' button using SetUIControl, but same call to disable the Starship buttons didn't work (presumably overridden by their programming).

Disappointed  

Anyone else have any ideas on accomplishing this?   Thanks in advance for any suggestions.