Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, August 29, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Record deleted records to audit table
Michael Rogers
Posts: 70
 
Record deleted records to audit tableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Aug 09 1:48 PM
I need to record to an audit table who, what and when related to deleted records( system and custom.) SQL Profile tells me this jerk "sysdba" seems to be responsible for most of them . SLX Profile could tell me if it was running on the machine of the user doing this. I was leaning toward a global script, possibly with secure events????

Some one has to have faced this before: anyone beaten it?

Thanks for your time and talent, Michael
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Record deleted records to audit tableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Aug 09 3:19 PM
Unless you are using Web Client, SQL Profiler should show you the IP Address (and/or host name) of the machine where the requests are coming from.

From there you could use other network tools to dig further.
[Reply][Quote]
Leon Gort
Posts: 127
 
Re: Record deleted records to audit tableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Aug 09 12:51 AM
Depending on what tables/views you are talking about, what about using the WScript object to get the user details and write them to an audit table like the user audit bundle does you can get on this site?

Set WshNetwork = CreateObject("WScript.Network")
ComputerName = WshNetwork.ComputerName
LoginName = WshNetwork.UserName


[Reply][Quote]
Michael Rogers
Posts: 70
 
Re: Record deleted records to audit tableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Aug 09 1:34 PM
Leon, the tricky bit isn't figuring out who deleted it, asuming you could intercept every delete statement on the way to the SQL server. Rauls's Idea of using the SQL profiler would work pretty well if I could overcome two issues: 1. Filter profiler to only show the deletes (no luck so far, still shows selects and updates) 2. Citrix users.

I suppose I could just eliminate their ability to delete records from any table and call it a day.......now I starting to sound like the security guys doing my audit.

Michael
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Record deleted records to audit tableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Aug 09 2:55 PM
For #1, it is quite simple to filter it out:

Add a Column filter for the "TextData" column: Like %delete%
(I have done this many times in the past, and works wonderfully).

For #2, I would suggest you go ahead with #1 and if you detect that the Deletes are coming from #2, then go ahead and use SLX Profiler:
Run SLX Profiler on the Citrix server.
Select to Profile All Applications
Add a Filter for "%delete%" as well


[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Record deleted records to audit tableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Aug 09 5:51 AM
You might also consider the use of a DELETE trigger on the host database, for the tables in which you are particularly interested. But if deletes are coming in through synchronisations, I can't imagine that you would be a able to track down the source user very easily.
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Record deleted records to audit tableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Aug 09 12:31 PM
Well step one is to limit the tables that users can delete records from. Severely.

Then on the forms where they are able to delete a record, you place your audit row inserting script.

Don't know what fields you want to record...
AuditTableID, Username, Userid, TableName, KeyFieldID, KeyfieldValue1, DateDeleted, etc.

But that's fairly easy to apply to many many forms....and you can sync in the deleted rows to the audit tables.

Be careful on Cascading deletes....where you have to track all of the children of children records.

Triggers unfortunately don't tell you who deleted the record......and don't know enough about monkeying with the SLX Provider extensions to play with it there....
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 8/29/2025 10:17:28 AM