Hi Nadya,
>Just curious, do you know a way to disable record validations and field level validations, when replace statement is fired?
>Basically, these are our validations:
>iif(vartype(oValid)<>"O",.f.,iif(oValid.nLocked=0,.t.,FieldRule()))
>So, if we want to disable them, we set oValid.nLocked to 0. However, still this portion of the code fires each time. Do you know a way to disable them completely?
To my best knowledge there isn't a way to disable field or record validations without deleting them.
B.T.W. your validationrule might also be written in the following manner:
VARTYPE(oValid)="O" AND (oValid.nLocked=0 OR FieldRule())
Or construct something like:
(VARTYPE(_DisableRule)="L" AND _DisableRule) OR FieldRule()
Where the default field rule is fired when the _DisableRule variable does not exist.
This would be more or less the same way I would try to disable the fields and record rules temporarely.
Walter,