Domanda

For a specific SharePoint 2010 web site, is there a way to get a list of all publishing pages (Pages library) items that are checked out regardless of how many subfolders deep they are located? Thanks.

È stato utile?

Soluzione

try to use this query:

SPQuery q = new SPQuery();
q.ViewAttributes = "Scope=\"Recursive\""
q.Query = "<Where><Geq><FieldRef Name='CheckoutUser' LookupId='TRUE'/><Value Type='int'>0</Value></Geq></Where>";
var pages = pagesList.GetItems(q);

Altri suggerimenti

Another, non code way to get a list of all checked out items, is the following. This is a neat small tool for your content editors, too.

  1. go to http://website/Reports%20List/AllItems.aspx
  2. Add new item. At the same query as above (0)
  3. go to the sitemanager http:///_layouts/sitemanager.aspx
  4. Select your library with publishing pages in it.
  5. Select in "View" the name of the query that you added:

reports view with checked out items

In a publishing site you can use Manage Content and Structure and under view change it to "All Draft documents"

(Site actions > Manage Content Structure)

View

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top