Consultor Eletrônico



Kbase P130997: RETURN "" in RowObjectValidate does not stop changes from being committed
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/12/2010
Status: Unverified

SYMPTOM(s):

RETURN "<error message>" in RowObjectValidate does not stop changes from being committed

RowObjectValidate in SmartDataObject raises validation error using RETURN "<error message>" statement

Pressing Cancel button on SmartToolBar (in Update mode) after error is shown does not undo changes

Changes are committed to the database instead

FACT(s) (Environment):

OpenEdge 10.1B
OpenEdge 10.1C
All Supported Operating Systems
OpenEdge Language Category: ADM

CHANGE:

Upgraded from earlier release to 10.1B or 10.1C

CAUSE:

Bug# OE00167955

FIX:

Upgrade to OpenEdge 10.1C01 or later
Upgrade to OpenEdge 10.2A or later

Workaround:

1. Fix adm2/data.p submitCommit to call doUndoRow when anyMessage is true.

This excerpt shows a section in the top of the submitCommit procedure.
The line that ends with /* THIS is the fix */ must be added.

IF DYNAMIC-FUNCTION("anyMessage":U IN TARGET-PROCEDURE) THEN
DO:
/* Add the update cancelled message */
RUN addMessage IN TARGET-PROCEDURE({fnarg messageNumber 15},?,?).
RUN doReturnToAddMode IN TARGET-PROCEDURE.
RUN doUndoRow IN TARGET-PROCEDURE. /* THIS is the fix */
RETURN "ADM-ERROR":U. /* If there were any Data messages */
END.

2. recompile and ensure the adm2/data.p r-code is saved/copied to gui and tty in the install.