Manual save of custom information |
Top Previous Next |
You can manually add information to your Audit file, using the SaveAuditMessage procedure.
SaveAuditMessage(Message)
For example, suppose you need to save an audit entry when your user press a button. In the event:accepted for the button, add the following:
SaveAuditMessage('The forbidden Button was pressed')
If you want to audit some local or global variables, you can simply add them to the saved string:
SaveAuditMessage('Warning: Amount approved: '&FORMAT(LOC:AMOUNT,@N_12.2))
You will see the message with all the related information (User, date, time, calling procedure, etc.) in the Audit Browse. Also, when you press the "View record" button in the Audit browse you will see a Message containing the full message you saved.
See also: The AboutWindow (Manual Event audit) example. |