moveIT
New Member
In procedure beginTransactionValidate I have to run some code if a field (LOGICAL) was set to true. If the BL returns that it is not allowed to set this field to true, an error sould occur and saving the record should be stopped (no problem with RETURN "<error-text>":U). But also the value of this field should be set to false and displayed in a smartdataview which does´t work. The field is displayed with true. How can this be done?
code example:
FOR EACH RowObjUpd WHERE RowObjUpd.RowMod = "U":U NO-LOCK:
IF LOOKUP (<field>, RowObjUpd.ChangedFields) <> 0 AND
RowObjUpd.<field> = YES
THEN DO:
RUN <BL> (OUTPUT llValid).
IF NOT llValid THEN DO:
RowObjUpd.<field> = NO. /* doesn´t work! */
RETURN "<error-text>":U.
END.
END.
END.
Regards,
moveIT
code example:
FOR EACH RowObjUpd WHERE RowObjUpd.RowMod = "U":U NO-LOCK:
IF LOOKUP (<field>, RowObjUpd.ChangedFields) <> 0 AND
RowObjUpd.<field> = YES
THEN DO:
RUN <BL> (OUTPUT llValid).
IF NOT llValid THEN DO:
RowObjUpd.<field> = NO. /* doesn´t work! */
RETURN "<error-text>":U.
END.
END.
END.
Regards,
moveIT