AnsweredAssumed Answered

Find a sites last modified date

Question asked by bduenskie@archinsurance.com on May 6, 2015

I'm looking to build a site workflow which will determine the last time the site was modified, and if it has not been modified within the past 180 days, send an email out to the site owners every 30 days over the course of three months to notify them the site will be deleted in 90 days.

 

I thought I would be able to find out the sites last modified date by calling the Site Data Web Service, but unfortunately that service seems to give me all sites within the site collection, and the last modified date is showing the same for each site (which cannot be correct).

 

This is an example of the results I saw from querying this service:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <soap:Body>

    <GetSiteResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">

      <GetSiteResult>0</GetSiteResult>

      <sSiteMetadata>

        <LastModified>2015-05-06T15:50:23.743</LastModified>

        <LastModifiedForceRecrawl>2015-04-24T13:43:00.343</LastModifiedForceRecrawl>

        <SmallSite>true</SmallSite>

        <PortalUrl />

        <ValidSecurityInfo>true</ValidSecurityInfo>

      </sSiteMetadata>

      <vWebs>

        <_sWebWithTime>

          <Url>http://mysite/legal</Url>

          <LastModified>2015-05-06T15:50:23.743</LastModified>

        </_sWebWithTime>

        <_sWebWithTime>

          <Url>http://mysite/legal/sub-site-1</Url>

          <LastModified>2015-05-06T15:50:23.743</LastModified>

        </_sWebWithTime>

        <_sWebWithTime>

          <Url>http://mysite/legal/sub-site-2</Url>

          <LastModified>2015-05-06T15:50:23.743</LastModified>

        </_sWebWithTime>

      </vWebs>

      <strGroups>my groups here</strGroups>

      <vGroups>

        <string>my groups here</string>

      </vGroups>

    </GetSiteResponse>

  </soap:Body>

</soap:Envelope>

 

Does anyone know of a way I can retrieve the last modified date of my site from within a workflow?

Outcomes