Audit Trail Code - Before Save or After Save?

Questions related to customising nuBuilder Forte with JavaScript or PHP.

Audit Trail Code - Before Save or After Save?

Unread postby pmjd » Wed Sep 08, 2021 1:27 am

Hello,

I've been implimenting this very useful code from forum members for implimenting a full audit trail in my nuBuilder project.
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
pmjd
 
Posts: 76
Joined: Fri Mar 12, 2021 7:08 pm
nuBuilder Version: 4.5

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

Unread postby kev1n » Wed Sep 08, 2021 2:11 am

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.
kev1n
nuBuilder Team
 
Posts: 2008
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

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

Unread postby pmjd » Wed Sep 08, 2021 6:30 pm

Ah, got it now. Makes perfect sense.
pmjd
 
Posts: 76
Joined: Fri Mar 12, 2021 7:08 pm
nuBuilder Version: 4.5


Return to Custom Code

Who is online

Users browsing this forum: No registered users and 7 guests

cron