VPME 9.1 FIX: Cancel button of on-form toolbar does not remove new record
Applies to: VPM Enterprise 9.1
Symptoms: When the New button of an on-form toolbar is clicked, and then immediately the Cancel
button is clicked, the new record is not removed. It takes three clicks of the Cancel button to
remove the new record.
Resolution: Make the following changes.
Remove the following line from the Click event of the New and Copy buttons in the OnForm_Toolbar
class in VPMCtrls.vcx.
ThisForm.nOnFormToolbarValidReturn0 = 0
Remove the following code from the AdminTool_FieldValidation method of the Form_ class in
VPMForms.vcx.
IF ThisForm.nOnFormToolbarValidReturn0 >= 0
IF ThisForm.nOnFormToolbarValidReturn0 < 2 AND EMPTY(stValue)
ThisForm.nOnFormToolbarValidReturn0 = ThisForm.nOnFormToolbarValidReturn0+1
RETURN 0
ELSE
ThisForm.nOnFormToolbarValidReturn0 = -1
ENDIF
ENDIF