VPME 8.0, VPMS 8.0 FIX: Error occurs on Related Pages form when saving record with duplicate PK
Applies to: VPM Enterprise 8.0, VPM Standard 8.0
Symptoms: An error occurs on a Related Pages form where a child/grandchild/etc. table is edited
through a grid and a new record that has a duplicate PK is attempted to be saved. After clicking the
OK button when notified that the new record contains a duplicate PK, the error occurs if the Restore
button on the toolbar is then clicked to remove the new record.
Resolution: To fix this problem, make the following modification to the Restore method of the VPMApp
class in the VPMApp class library. Note: This modification will only fix the problem in your
applications, not within VPM itself.
Change the two occurrences of:
GOTO stnRecordBeforeAdd
To:
This.BypassErrorHandling_Start()
GOTO stnRecordBeforeAdd
IF This.BypassErrorHandling_Stop()
This.GoEOF(ALIAS(),SET('DATASESSION'))
ENDIF