Good tip, that. I've got the logging working nicely, just one more problem to overcome.
In this particular case, I need to conditionally allow the cascade delete on the child records, depending on field data. If any fail, disallow the parent delete BUT keep the child deletions intact. Today, my mind is more on food that code. Tomorrow is another day....
>Yes, it is only a question of chaining with AND.
>
>By the way, you can use shortcut boolean evaluation to your advantage.
>
>In an expression like:
>
>
>_ri_Table1_delete() AND udf_copy_to_history()
>
>
>(Assuming that the first function is the built-in RI function, and the second your UDF)
>
>Your UDF will only be invoked if the RI function was successful. This is because, if it returns .F., the AND will always be .F., no matter what the second part of the expression returns. In this case, then, VFP doesn't even evaluate the second part.
>
>In other words, there is nothing for you to worry about, as long as you put the functions in the correct order (only copy to history data AFTER the delete was successful).