Page 1 of 1

Audit Trail Code - Before Save or After Save?

Posted: Tue Sep 07, 2021 5:57 pm
by pmjd
Hello,

I've been implimenting this very useful code from forum members for implimenting a full audit trail in my nuBuilder project.
https://forums.nubuilder.cloud/viewtopic.php?f=20&t=9413
(I know that nulog is now available but this approach of being able to log all changes, including what they were and by who, is critical to my project.)

The code has been implimented in the form's Before Save field.

Question is, does this need to be in Before Save or is it just as effective if it is in After Save code section?

In the After Save section is give me additional access to more hash cookies to add to the audit trail.

Any thoughts on this appreciated,
Paul

Re: Audit Trail Code - Before Save or After Save?

Posted: Tue Sep 07, 2021 6:41 pm
by kev1n
The code has to be placed in BS since it retrieves the values from the the table before saving the data and compares them to the values that were changed.

Re: Audit Trail Code - Before Save or After Save?

Posted: Wed Sep 08, 2021 11:00 am
by pmjd
Ah, got it now. Makes perfect sense.