15.8. Changing Key Values in an Interceptor

Although you could try and do it via a pluggableEvent, as it currently stands this can not be done.

Apparently if a field is marked with isKey="true" in the config file, the preDelete and preUpdate methods disregard any changes to it.

Carlos Anjos pointed out:

I had a situation where I did some processing in the preDelete method and then I wanted to allow the operation, but on a different row. So I changed the values in fieldValues, but still the orginal row got deleted.

After banging my head for where in my code the error was, I finally understood that dbforms was ignoring the change to that attribute. A friend of mine went through dbforms deleteEvent code and confirmed that.