When developing webparts and/or CAML for a query – such as jQuery+JSON – or whatever purpose, you might be needing/wanting to get the “GUID” of the current web.
This is a bit tricky – and more annoying than anything.
There are some Powershell scripts – and awesome tools like CAML Builder – or SharePoint Manager – but if you don’t have those – and need it quickly, I have a great tip for you…
- Click Site Settings
- Click Content And Structure
- You might need to “go to root site settings” – if you’re within a sub-site
OR – you can simply enter the URL…>
- Within the Manage Content and Structure screen, find the site you want to check the GUID.
- Here’s the trick – need to RIGHT-CLICK on the URL – and then select PROPERTIES
- Within the dialog, highlight the URL – and right-click + copy
- Then, open a new Notepad screen – and click Paste
- Within the URL, the first bit is the GUID of the Site Collection
- The second part is the GUID of the SPWeb (ie. the WebSite you want !)
Just take a copy of the GUID – and you can then use wherever you need/want.
To get the GUID of a particular LIST – you can use the same approach.
- Choose the list you want, and right-click
- Copy the URL, and paste into Notepad
Yet another easy way to get an SPList GUID is to look at the “Settings” page for a list.
- Switch to the List tab (in SP2010) – or just click Settings (in SP2007)
- Click List Settings
- Click on Audience Targetting Settings
- Check the URL – and you have ALL you need
These tips/tricks have save me LOTS of time – hope they help you too…!