Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Getting "Modified" without GetSubWebsforCurrentUser

  Asked By: Felicia    Date: Nov 14    Category: Sharepoint    Views: 1800

WSS SDK states the following for the SPWeb Object: The LastItemModifiedDate
property applies only to sites returned by using one of the
GetSubwebsForCurrentUser methods of the SPWeb class. The remarks for
SPWeb.Created add: The Created property applies only to sites returned by
using one of the GetSubwebsForCurrentUser methods of the SPWeb class and
returns a Microsoft.SharePoint.SPException exception if applied to a site
collection that is not obtained by using one of these methods. This same
exception is raised for SPWeb.Modified if you don't get the site using
GetSubwebsForCurrentUser.

Question, how does one get a last modified date for an SPWeb object that was
not obtained by using one of the GetSubwebsForCurrentUser calls?

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Megan Martin     Answered On: Nov 14

For now, I loopedthrough the SPLists of the site  and got the maximum last
modified date. Is there a better way anyone?

 
Answer #2    Answered By: Donta Kirkland     Answered On: Nov 14

I did the same this by looping through the list to get last modified  item.

LastItemModifiedDate property  of the SPList gave me incorrect date.
But you are working with Lists and I was working with one list. I don't know why LastItemModifiedDate gave incorrect result.

 
Answer #3    Answered By: Cade Velazquez     Answered On: Nov 14

I think that is the only alternative...........

 
Didn't find what you were looking for? Find more on Getting "Modified" without GetSubWebsforCurrentUser Or get search suggestion and latest updates.