Get List and View Indentifiers in SharePoint
September 22, 2013 1 Comment
Those, like me, that put in the position of managing a SharePoint Team Site without SharePoint Designer access (or indeed without the ability to install development software of any kind) are forced to get creative sometimes. Leveraging the many rich (but annoying inscrutable) web services available offers a lot of interesting possibilities but adds significant challenges. Most people will start with getting data from lists.
Every list and view in SharePoint is assigned a globally unique identifier (“GUID”). The web services that deal with lists require these GUIDs to be passed as parameters but the SharePoint web interface doesn’t provide a tool to access or review them. It does, however, provide a simple way to get access to them.
Begin by accessing the view that you’re interested in and then choose to modify it (in SP 2007 this is done via the “Settings” drop down on the list toolbar, in 2010 it’s managed via the Ribbon). The very last item on the view settings page is a section for “Mobile” and this section provides the “Web address for the this mobile view:” (see image).
The web address has two parameters: the GUIDs for the List itself (“List”) and for the current view (“View”). These are URL encoded but can be easily decoded manually as there is only one encoded value, “%2D” or the dash (“-”). The web services also require the GUID to be sent enclosed in braces. Considering that a GUID pulled from the mobile URL like the following:
Would convert to (after conversion every GUID will also be exactly 36 characters long):
Of course once you have the IDs of the lists you’ll want to use them for something. I plan on covering how to do that in a series of future articles but for now I’ll let you bask in the glow of prying this small, ill-kept secret from the bowels of the system.