November 20, 2012

Hide Revert To Template

 <style type="text/css">
 body #pageStatusBar{height:0px; font-size:0px; padding:0px; border-style:none;}
 </style>
</asp:Content>

November 07, 2012

DataForm webpart for subsites

Requirement: Get data from the parent site and show in subsite using dataform webpart.

Steps.
1. Designer --> Add Empty DataForm Webpart
2. Select Source
3. Insert Selected Fields as multiple items view.
4. Remove all ListNames and change it to ListIDs in parameter binding and datasource section.
5. Remove listid and listname in dataformwebpart attributes section.
4. Add below for parameter binding.
<ParameterBinding Name="WebURL" Location="None" DefaultValue="/sites/subsite/"/>
5. Add below for select/update/insert/delete parameters
<WebPartPages:DataFormParameter Name="WebURL" ParameterKey="WebURL" PropertyName="ParameterValues" DefaultValue="/sites/subsite/"/>

October 26, 2012

Search query string '&'

In Sharepoint search when query string needs to search with & symbol, just replace it with + symbol.

September 06, 2012

Iterating Large SharePoint Lists with PowerShell

http://blogs.msdn.com/b/kaevans/archive/2012/02/13/iterating-large-sharepoint-lists-with-powershell.aspx

$web = Get-SPWeb http://portal.sharepoint.com
$list = $web.Lists["LargeList"]

$spQuery = New-Object Microsoft.SharePoint.SPQuery
$spQuery.ViewAttributes = "Scope='Recursive'";
$spQuery.RowLimit = 2000
$caml = '<OrderBy Override="TRUE"><FieldRef Name="ID"/></OrderBy>'
$spQuery.Query = $caml

do
{
    $listItems = $list.GetItems($spQuery)
    $spQuery.ListItemCollectionPosition = $listItems.ListItemCollectionPosition
    foreach($item in $listItems)
    {
        Write-Host $item.Title
    }
}
while ($spQuery.ListItemCollectionPosition -ne $null)

SonarQube with Jenkins Setup using Docker Images

https://funnelgarden.com/sonarqube-jenkins-docker/  https://medium.com/@hakdogan/an-end-to-end-tutorial-to-continuous-integration-and-con...