Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Count of list.GetChanges is allways 0

$
0
0

Hi,

I have the following code to get the chnage log of a list.

After I do some changes the count is allways = 0.

What is wrong with the code ?

Thanks

Stephan

SPSecurity.RunWithElevatedPrivileges(
                    delegate
                    {
                        using (SPSite elevatedSite = new SPSite((site.RootWeb.Site.ID)))
                        {
                            using (SPWeb elevatedWeb = elevatedSite.OpenWeb((site.RootWeb.ID)))
                            {
                                SPList list = elevatedWeb.GetList("http://sharepointdev:8888/sites/test1/Lists/TestList1");
                                SPChangeToken startToken = null;

                                SPChangeCollection changes = list.GetChanges(startToken);                              
                                int count = changes.Count;
                            }
                        }
                    });


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>