Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

How to find the recently added item in the share point page

If the any user added the items in the custom list, library, list,Announcement, Picture library,etc.........

i need to show all item that added last 2 days. Is that any object model available to find all item in the share point site???Instead of searching every list.

share|improve this question
add comment

3 Answers 3

up vote 2 down vote accepted

Well you can use the SPWeb.GetChanges method which queries the change log and returns a collection of changes that have occurred in the Web site.

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.getchanges.aspx

You can further drill down this detial at the list or item level and even get changes in a specific duration.

share|improve this answer
    
here is an working example msdn.microsoft.com/en-us/library/ms439213.aspx –  Vivek Sep 15 '10 at 11:29
add comment

SPSiteDataQuery or maybe even ContentByQueryWebPart?

Apply a filter on Created field.

share|improve this answer
    
I agree that the CQWP (Content Query Web Part) would seem to be a good out-of-the-box first choice for doing this. –  lwbecker2 Nov 12 '11 at 4:08
add comment

You could probably use the search API to find all list items and filter where the creation date is greater than or equal to today minus two days.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.