﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » Which events should I use for auditing?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Fri, 22 May 2026 07:55:11 GMT</lastBuildDate><ttl>20</ttl><item><title>Which events should I use for auditing?</title><link>http://forum.strataframe.net/FindPost6794.aspx</link><description>Which BO events should I place my auditing code into?&lt;br&gt;
&lt;br&gt;
I'm using the AfterAddNew event to place my created by audit info in the proper fields. I believe this is the right event for new records, but I'd like confirmation. ;-)&lt;br&gt;
&lt;br&gt;
    Private Sub BluePrintsBO1_AfterAddNew(ByVal e As System.EventArgs) Handles BluePrintsBO1.AfterAddNew&lt;br&gt;
        Me.BluePrintsBO1.Created = Now&lt;br&gt;
        Me.BluePrintsBO1.CreatedBy = SystemInformation.UserName&lt;br&gt;
    End Sub&lt;br&gt;
&lt;br&gt;
Which event should I use when a record is modified?&lt;br&gt;
&lt;br&gt;
Thanks&lt;br&gt;
&lt;br&gt;</description><pubDate>Thu, 15 Feb 2007 13:50:47 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: Which events should I use for auditing?</title><link>http://forum.strataframe.net/FindPost6825.aspx</link><description>You will want to use the&amp;nbsp;Navigating event of the BO.&amp;nbsp; This event is fired through the BusinessBindingSource when using grids.</description><pubDate>Thu, 15 Feb 2007 13:50:47 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Which events should I use for auditing?</title><link>http://forum.strataframe.net/FindPost6816.aspx</link><description>Whoops! spoke too soon. I'm using a grid so I'd like to update the Modified fields when they change a row. So if they move to another row if they made any changes to that row I'd need to update those fields before they moved. &lt;/P&gt;&lt;P&gt;So I thought I would use the C&lt;FONT size=2&gt;heckRulesOnCurrentRow method in the BO. &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;So... my next questions are...&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp; Is there a dirty property for each record i could check to determine whether I need to update these fields?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp; Am I correct in my approach here?&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Thu, 15 Feb 2007 10:20:29 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: Which events should I use for auditing?</title><link>http://forum.strataframe.net/FindPost6814.aspx</link><description>That'll work. I'll test the editing state on the save. ;-)</description><pubDate>Thu, 15 Feb 2007 10:10:48 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: Which events should I use for auditing?</title><link>http://forum.strataframe.net/FindPost6811.aspx</link><description>It just depends on what you are trying to accomplish and what type of events you are auditing.&amp;nbsp; You are correct on the Add...this is what I would do.&amp;nbsp; As for the Edit, I would do this in the BeforeSave or AfterSave event and test on the EditingState of the BO to know if this is a new or existing record.</description><pubDate>Thu, 15 Feb 2007 10:06:33 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>