Ignore deletion of old items?

Feb 11, 2010 at 2:26 AM

One of the benefits of SLAM, it seems to me, is the fact that a SQL database can scale much larger than a SharePoint list.  So I'd like to be able to purge data from a list I'm SLAMming, so that it only contains the last three months of data, but NOT delete these items from the database.  Can the ItemDeleting event handler be modified to ignore items created more than 90 days ago? 

Developer
Feb 11, 2010 at 2:47 AM

Yes, absolutely.  The way you would do that is to create a custom SLAM profile.  SLAM profiles allow you to override the default behavoir when an item is slammed.  In your case you would update the ItemDeleting event handler to only function if the item was created within the last 90 days. 

See the hierarchy example for how to construct a SLAM profile.

Yours,

Allan

Feb 11, 2010 at 10:41 AM

OK, thanks, I’ll probably do that. But I’m curious about the possibility of taking a more manual approach: What if I disabled the ItemDeleting event handler while I performed the purge of older items in a list, then re-enabled it afterward? That would work, wouldn’t it, but I’d have to avoid using the Synchronize button, right?

David

From: awellenstein [mailto:notifications@codeplex.com]
Sent: Wednesday, February 10, 2010 10:48 PM
To: David L. Tappan
Subject: Re: Ignore deletion of old items? [SLAM:84021]

From: awellenstein

Yes, absolutely. The way you would do that is to create a custom SLAM profile. SLAM profiles allow you to override the default behavoir when an item is slammed. In your case you would update the ItemDeleting event handler to only function if the item was created within the last 90 days.

See the hierarchy example for how to construct a SLAM profile.

Yours,

Allan

Read the full discussion online.

To add a post to this discussion, reply to this email (SLAM@discussions.codeplex.com)

To start a new discussion for this project, email SLAM@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


David L. Tappan
MCSE:Messaging, MCP: WSS & MOSS
Consultant
C/D/H
Technology Consultants
I.D.E.A.S. that make technology work
15 Ionia SW, Suite 270
Grand Rapids, MI 49503
Office:+1-616-776-1600

Mobile:+1-616-634-4407
Direct:+1-616-233-4510