I am trying to validate the quantity field on the SOP Transaction Entry form, and cancel a change based on business logic. I am using the following code:
AddHandler Dynamics.Forms.SopEntry.SopEntry.LineScroll.Qty.ValidateBeforeOriginal, AddressOf oSOPTransEntDetail.qtyValidate
and the event that fires is this one:
Sub qtyValidate(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)
MsgBox("This item has begun shipping. Quantity increases are not allowed.")
e.Cancel = True
The event fires, the message box displays, but the edit to the field does not cancel. Is there a bug in the 'validateBeforeOriginal'? Have I done something wrong?