Sunday, July 21, 2013
Tuesday, July 9, 2013
CAML - AssignedTo [Me]
"<Where><Eq><FieldRef Name=\"AssignedTo\" /><Value Type=\"Integer\"><UserID Type=\"Integer\" /></Value></Eq></Where>"
Reference:
http://blogs.syrinx.com/blogs/sharepoint/archive/2008/08/07/caml-query-to-select-items-assigned-to-current-user.aspx
Reference:
http://blogs.syrinx.com/blogs/sharepoint/archive/2008/08/07/caml-query-to-select-items-assigned-to-current-user.aspx
Monday, June 10, 2013
Access Denied for Site Collection Administrator
Make sure the Cache Super User has Full Control in the Web Application User Policy.
Make sure the Cache Super Reader has Full Read in the Web Application User Policy.
Make sure the Cache Super Reader has Full Read in the Web Application User Policy.
Delete Line Numbers
Maybe there's a better way to do this, but if you copy and paste code that includes line numbers, you can easily remove them by selecting columns of text in Visual Studio:
To select columns of text:
Hold down SHIFT + ALT while dragging the mouse pointer over a block of text.
Reference:
http://joelabrahamsson.com/select-columns-of-text-in-visual-studio/
To select columns of text:
Hold down SHIFT + ALT while dragging the mouse pointer over a block of text.
Reference:
http://joelabrahamsson.com/select-columns-of-text-in-visual-studio/
Wednesday, May 8, 2013
PowerShell - Delete Fields From Content Types
# DELETE A FIELD FROM A LIST CONTENT TYPE
$web = Get-SPWeb http://localhost
$list = $web.Lists["MyList"]
$listContentTypes = $list.ContentTypes
$listContentType = $listContentTypes["My List Content Type"]
$listFieldLink = $listContentType.FieldLinks["MyListFieldInternalName"]
$listContentType.FieldLinks.Delete("MyListFieldInternalName")
$listContentType.Update()
# DELETE A FIELD FROM A SITE CONTENT TYPE
$web = Get-SPWeb http://localhost
$webContentTypes = $web.ContentTypes
$webContentType = $webContentTypes["My Web Content Type"]
$webFieldLink = $webContentType.FieldLinks["MyWebFieldInternalName"]
$webContentType.FieldLinks.Delete("MyWebFieldInternalName")
$webContentType.Update()
Thursday, April 25, 2013
Friday, April 19, 2013
Restore a Site to the same Content Database with Gradual Site Delete
Looks like in order to restore a site to the same Content Database, one must perform the following steps after deleting the site:
1. get-spdeletedsite -webapplication http://samplesite.com | Remove-SPDeletedSite
2. Central Administration > 'Monitoring' > 'Review job definitions' > 'Gradual Site Delete' (For the appropriate Web Application) > 'Run Now' button.
References:
http://reality-tech.com/2012/04/04/gradual-site-collection-deletion/
1. get-spdeletedsite -webapplication http://samplesite.com | Remove-SPDeletedSite
2. Central Administration > 'Monitoring' > 'Review job definitions' > 'Gradual Site Delete' (For the appropriate Web Application) > 'Run Now' button.
References:
http://reality-tech.com/2012/04/04/gradual-site-collection-deletion/
Subscribe to:
Posts (Atom)