Sam wrote:
When I try to override the OnFieldValidateComplete method I get a stack overflow if I try to set any properties in it as it re-fires the event and gets caught in an infinite loop. Also, the overriding PostFieldValueSetAction doesn't seem to work as the code never seems to get called. Any ideas?
protected override void OnFieldValidateComplete(IEntityField field, bool validationResult)
{
IsSynced = false;
base.OnFieldValidateComplete(field, validationResult);
}
Buffer overflow
With a stack overflow, you call the same methods in a recursive way. I don't see how that can be the case with your code. If you break in your override during a debug session, (so step into the set of the field) you should be able to determine the call stack and thus which methods call which methods. Either way, you don't have to call the base method, that one is empty.
protected override void PostFieldValueSetAction(bool fieldValueSet)
{
IsSynced = false;
base.PostFieldValueSetAction(fieldValueSet);
}
Never gets fired
That's because the exception occurs before this method is ever called.