<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Welcome to ShanthaKumar&#039;s Blog, SharePoint and more...</title>
	<atom:link href="http://www.ktskumar.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ktskumar.com</link>
	<description>more Points to Share....</description>
	<lastBuildDate>Tue, 13 Dec 2011 17:36:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Enumerate SiteCollections</title>
		<link>http://www.ktskumar.com/blog/2011/12/enumerate-sitecollections/</link>
		<comments>http://www.ktskumar.com/blog/2011/12/enumerate-sitecollections/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 17:36:09 +0000</pubDate>
		<dc:creator>Shantha Kumar</dc:creator>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint-2010]]></category>
		<category><![CDATA[SPSite]]></category>
		<category><![CDATA[SPWebApplication]]></category>

		<guid isPermaLink="false">http://www.ktskumar.com/?p=558</guid>
		<description><![CDATA[SharePoint is the platform where we can store the set of values as items, files as documents in folder or Library. But how we manage all the data&#8217;s, there comes Web sites. The above collection of web sites are managed by Site Collection, which is a placeholder or container for all the web sites. Here [...]]]></description>
			<content:encoded><![CDATA[<p><font size="3" face="Cambria">SharePoint is the platform where we can store the set of values as items, files as documents in folder or Library. But how we manage all the data&#8217;s, there comes Web sites. The above collection of web sites are managed by Site Collection, which is a placeholder or container for all the web sites.</font></p>
<p><font size="3" face="Cambria">Here I am enroll the snippet for enumerating the all the site collections from the web application. This Web Application is nothing but a IIS Site and has some specific properties helps to manage the Collection of Site Collections.</font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#008000">//Retrieving the webapplication based on Url</font>&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#307eb8">SPWebApplication webapps = SPWebApplication.Lookup(new Uri(&#8220;</font><a href="http://localhost&quot;));"><font color="#307eb8">http://localhost&#8221;));</font></a><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#008040">//Gets all the sites under the WebApplication<br /></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#307eb8">SPSiteCollection sites = webapps.Sites;<br /></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#008040">//Iterating the site collection and printing</font><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#307eb8">foreach (SPSite s in sites)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine(s.Url);</font><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#008040">//Disposing the SiteCollection object, use to clears the memory obtained for SPSite object</font>&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#307eb8">&nbsp;&nbsp; s.Dispose();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ktskumar.com/blog/2011/12/enumerate-sitecollections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delete old Item with new Item using SharePoint Designer Workflow</title>
		<link>http://www.ktskumar.com/blog/2011/12/delete-old-item-with-new-item-with-sharepoint-designer-workflow/</link>
		<comments>http://www.ktskumar.com/blog/2011/12/delete-old-item-with-new-item-with-sharepoint-designer-workflow/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 06:07:12 +0000</pubDate>
		<dc:creator>Shantha Kumar</dc:creator>
				<category><![CDATA[SharePoint-2010]]></category>
		<category><![CDATA[SharePoint Designer]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">http://www.ktskumar.com/?p=546</guid>
		<description><![CDATA[I have a scenario from SharePoint MSDN Forum, which states, If I have an item Title named ‘Kumar’ and I am going to create a new item with Title named ‘Kumar. I need to delete the old item. Note: In following example I have renamed the Title Display Name to ‘Names’ Here I am using [...]]]></description>
			<content:encoded><![CDATA[<p>I have a scenario from SharePoint MSDN Forum, which states,</p>
<p><em><strong>If I have an item Title named ‘Kumar’ and I am going to create a new item with Title named ‘Kumar. I need to delete the old item.</strong></em> </p>
<p>Note: In following example I have renamed the Title Display Name to ‘Names’</p>
<p>Here I am using SharePoint Designer workflow to achieve this by following way,</p>
<ul>
<li>I have to get the old List Item, </li>
<li>Then compare the current (new item) with the old item</li>
<li>And the Old Does not have the Current Item Id</li>
<li>If above two steps are true, then delete the old item.</li>
</ul>
<p>
I have elaborated the above steps with the following activities,</p>
<ol>
<li>Create a List Workflow and associate to a List and Set the Start Option as &#8220;Start Workflow automatically when an item is created&#8221;<br/><br/></li>
<li>In workflow step, First we have to create a workflow variable to get the item id which matches value entered in Current Item.<br/><br/</li>
<li>Using “<strong>Set Workflow Variable</strong>” activity we are getting that Item id. Add the parameters as shown below. And name the workflow variable as ‘OldItemId’<br/><br />
   <a href='/wp-content/uploads/2011/12/wf_delitem1.jpg' target='_blank'><img src='/wp-content/uploads/2011/12/wf_delitem1.jpg'/></a><br/><br/</li>
<li>In the above figure I am getting the Item ID from the last item which matches the same vale for the Names field.<br/><br/</li>
<li>For the following 2 steps, we have to <strong>If Current Item field equals value</strong> condition activity.<br/><br/</li>
<li>Now we have to compare the Current Item value against the item returned by ‘OldItemId’<br/><br />
  <a href='/wp-content/uploads/2011/12/wf_delitem2.jpg' target='_blank'><img src='/wp-content/uploads/2011/12/wf_delitem2.jpg'/></a><br/><br/</li>
<li>Then we have to compare the ‘OldItemId’ not same as Current Item Id.<br/><br/<br />
    <a href='/wp-content/uploads/2011/12/wf_delitem3.jpg' target='_blank'><img src='/wp-content/uploads/2011/12/wf_delitem3.jpg'/></a><br/><br/</li>
<li>The Use the <strong>Delete Item</strong> activity to delete the item based on ‘OlditemId’<br/><br/<br />
   <a href='/wp-content/uploads/2011/12/wf_delitem2.jpg' target='_blank'><img src='/wp-content/uploads/2011/12/wf_delitem4.jpg'/></a><br/><br/</li>
</ol>
<p>Now the duplicate was item added with a same value will delete the old item.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ktskumar.com/blog/2011/12/delete-old-item-with-new-item-with-sharepoint-designer-workflow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Catch the Unique Items from SharePoint List</title>
		<link>http://www.ktskumar.com/blog/2011/11/catch-the-unique-items-from-sharepoint-list/</link>
		<comments>http://www.ktskumar.com/blog/2011/11/catch-the-unique-items-from-sharepoint-list/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 07:27:22 +0000</pubDate>
		<dc:creator>Shantha Kumar</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint-2010]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Unique]]></category>

		<guid isPermaLink="false">http://www.ktskumar.com/?p=528</guid>
		<description><![CDATA[I have lot of items from SharePoint List, but most of the items are duplicated. Here, I am going to give you a tips on getting unique rows from the List. For that, I googled for some time and then I found out there is no way to get the items based on CAML. So [...]]]></description>
			<content:encoded><![CDATA[<p>I have lot of items from SharePoint List, but most of the items are duplicated. Here, I am going to give you a tips on getting unique rows from the List. For that, I googled for some time and then I found out there is no way to get the items based on CAML.</p>
<p>So I tried to use LINQ to query the SharePoint Items. It works perfectly well for me. Here I provided my code to get the SharePoint Unique ListItems based on latest Items.</p>
<p>In the following example, I am first sorting the Items based on Modified field and then getting the unique item based on Title field by grouping.</p>
<p><code><strong><span style='color:#000066;'><br />
            using (SPSite site = new SPSite("http://localhost"))<br />
            {<br />
                using (SPWeb web = site.OpenWeb())<br />
                {<br />
                    SPList list = web.Lists.TryGetList("MyList");<br />
                    string Modi = "Modified";<br />
                    List<SPListItem> lstitems =<br />
                        (from l in list.Items.OfType&lt;SPListItem&gt;() orderby l[Modi] descending select l).ToList&lt;SPListItem&gt;();</span></strong></code></p>
<p><code><strong><span style='color:#000066;'>                    var listitemDistinct = lstitems.GroupBy(item1 => item1.Title, (key, group) => group.First()).ToList();</span></strong></code></p>
<p><code><strong><span style='color:#000066;'>                     foreach (SPListItem i in listitemDistinct)<br />
                    {<br />
                        Console.WriteLine("Title: " +i.Title +"Modified: " + i[Modi].ToString());<br />
                    }<br />
                }<br />
            }<br />
</span></strong></code></p>
<p>If the ListItems has the following items,</p>
<table>
<tr>
<td>ID</td>
<td>Title</td>
<td>Modified</td>
</tr>
<tr>
<td>1</td>
<td> Sample 1 </td>
<td> 11/16/2011</td>
</tr>
<tr>
<td>2</td>
<td> Sample 2 </td>
<td> 11/17/2011</td>
</tr>
<tr>
<td>3</td>
<td> Sample 1 </td>
<td> 11/18/2011</td>
</tr>
<tr>
<td>4</td>
<td> Sample 2 </td>
<td> 11/19/2011</td>
</tr>
</table>
<p>Result:<br />
Title: Sample 2 Modified: 11/19/2011<br />
Title: Sample 1 Modified: 11/18/2011</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ktskumar.com/blog/2011/11/catch-the-unique-items-from-sharepoint-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySite Url via UserProfile</title>
		<link>http://www.ktskumar.com/blog/2011/11/mysite-url-via-userprofile/</link>
		<comments>http://www.ktskumar.com/blog/2011/11/mysite-url-via-userprofile/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 06:25:02 +0000</pubDate>
		<dc:creator>Shantha Kumar</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[UserProfile]]></category>

		<guid isPermaLink="false">http://www.ktskumar.com/?p=521</guid>
		<description><![CDATA[UserProfile has the two property members for retrieving the Url for the User. Those propertis returns the MySite Url and Personal Site url for the User. UserProfile.PersonalUrl Here, i am adding some code snippets, which gets these Url values from MySite. Using(SPSite _site = new SPSite("http://localhost")) { SPServiceContext context = SPServiceContext.GetContext(_site); UserProfileManager profileManager = new [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://msdn.microsoft.com/en-us/library/ms566874.aspx' title='User Profile'>UserProfile</a> has the two property members for retrieving the Url for the User. Those propertis returns the MySite Url and Personal Site url for the User.</p>
<ul>
<li><a href='http://msdn.microsoft.com/en-us/library/microsoft.office.server.userprofiles.userprofile.publicurl.aspx' title='User's Public Url'>UserProfile.PublicUrl</a></li>
<li><a href='http://msdn.microsoft.com/en-us/library/microsoft.office.server.userprofiles.userprofile.personalurl.aspx' title='User's Personal Url'>UserProfile.PersonalUrl</a></li>
</ul>
<p>Here, i am adding some code snippets, which gets these Url values from MySite.<br/><br />
 <code> <strong>Using(SPSite _site = new SPSite("http://localhost"))<br />
  {<br />
    SPServiceContext context = SPServiceContext.GetContext(_site);<br />
    UserProfileManager profileManager = new UserProfileManager(context);<br />
    string UAccount = "DomainName\\spuser"; </strong><br />
    <span style='color:green;'>//Getting the UserProfile based on the User's Login Name</span><br />
       <strong>UserProfile u = profileManager.GetUserProfile(UAccount);</strong><br />
    <span style='color:green;'>//Getting the User's Personal Site(Site Collection created for User's MySite) Url</span><br />
       <strong>Console.WriteLine("My Content Url: " + u.PersonalUrl.ToString());</strong><br />
    <span style='color:green;'>//Getting the User's MySite Url</span><br />
<strong>       Console.WriteLine("My Site Url: " +u.PublicUrl.ToString());<br />
  }</strong></code></p>
<p>RESULT:<br />
<strong>My Content Url: http://localhost/my/personal/spuser/<br />
My Site Url: http://localhost/my/Person.aspx?accountname=DomainName\spuser </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ktskumar.com/blog/2011/11/mysite-url-via-userprofile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SiteCollection Storage Information</title>
		<link>http://www.ktskumar.com/blog/2011/11/sitecollection-storage-information/</link>
		<comments>http://www.ktskumar.com/blog/2011/11/sitecollection-storage-information/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 06:53:56 +0000</pubDate>
		<dc:creator>Shantha Kumar</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint-2010]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Usage]]></category>

		<guid isPermaLink="false">http://www.ktskumar.com/?p=519</guid>
		<description><![CDATA[SharePoint has the Usage Analysis Time job, which updates the following information for the sites, Storage, Discussion Storage, Bandwidth, Hits, Visits The SPSite.Usage property gives us the information of site usage, bandwidth, visits. Here I am adding the snippet for getting the Free Space available against Storage Quota and Space used by Site Collection, using [...]]]></description>
			<content:encoded><![CDATA[<p>SharePoint has the Usage Analysis Time job, which updates the following information for the sites, </p>
<ul>
<li>Storage,</li>
<li>Discussion Storage,</li>
<li>Bandwidth,</li>
<li>Hits,</li>
<li>Visits</li>
</ul>
<p>The <strong>SPSite.Usage</strong> property gives us the information of site usage, bandwidth, visits.<br />
Here I am adding the snippet for getting the Free Space available against Storage Quota and Space used by Site Collection,</p>
<p>                <code>using (SPSite site = new SPSite("http://localhost"))<br />
                {<br />
                        SPSite.UsageInfo susg = site.Usage;<br />
                        long spaceused = (((susg.Storage + 0x80000L) / 0x100000L));<br />
                        if (site.Quota.StorageMaximumLevel == 0L)<br />
                        {<br />
                            Console.WriteLine("Storage Quota: Not applicable");<br />
                            Console.WriteLine("Free Space Available: Unlimited");<br />
                        }<br />
                        else<br />
                        {<br />
                            long sitequota = (site.Quota.StorageMaximumLevel / 0x100000L);<br />
                            long freespace = sitequota - spaceused;<br />
                            Console.WriteLine("Storage Quota: " + sitequota.ToString());<br />
                            Console.WriteLine("Free Space Available: " + freespace.ToString() + " MB");<br />
                        }<br />
                        Console.WriteLine("Storage Used: " + spaceused + " MB");<br />
                }</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ktskumar.com/blog/2011/11/sitecollection-storage-information/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clear SharePoint Lists</title>
		<link>http://www.ktskumar.com/blog/2011/11/clear-sharepoint-lists/</link>
		<comments>http://www.ktskumar.com/blog/2011/11/clear-sharepoint-lists/#comments</comments>
		<pubDate>Sun, 27 Nov 2011 03:07:09 +0000</pubDate>
		<dc:creator>Shantha Kumar</dc:creator>
				<category><![CDATA[SharePoint-2010]]></category>
		<category><![CDATA[ListItem]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Utility]]></category>

		<guid isPermaLink="false">http://www.ktskumar.com/?p=514</guid>
		<description><![CDATA[My colleague asked me about, is there any tool available for removing the entire list items from multiple list with single Click. I have taken that idea and created a tool for removing the entire items. URL: http://clearspitems.codeplex.com/ The project is in alpha stage, i have planned for adding more functionality to this tool. And [...]]]></description>
			<content:encoded><![CDATA[<p>My colleague asked me about, is there any tool available for removing the entire list items from multiple list with single  Click. I have taken that idea and created a tool for removing the entire items.</p>
<p><strong>URL: <a href='http://clearspitems.codeplex.com/' title='Removing Entire ListItems'>http://clearspitems.codeplex.com/</a></strong></p>
<p>The project is in alpha stage, i have planned for adding more functionality to this tool. And I will also publish this in the format of stsadm, powershell and in Ribbon mode.</p>
<p>I am expecting those things to be happen within next week..</p>
<p>So stay tuned &#8230; :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ktskumar.com/blog/2011/11/clear-sharepoint-lists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Workflow not started  on Item Creation?</title>
		<link>http://www.ktskumar.com/blog/2011/11/why-workflow-not-started-on-item-creation/</link>
		<comments>http://www.ktskumar.com/blog/2011/11/why-workflow-not-started-on-item-creation/#comments</comments>
		<pubDate>Sun, 20 Nov 2011 02:22:24 +0000</pubDate>
		<dc:creator>Shantha Kumar</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Tips]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">http://www.ktskumar.com/?p=509</guid>
		<description><![CDATA[There are some cases, why the workflow was not started during item creation, 1. If you create an item using System Account, the workflow will not funtion properly or that couldn&#8217;t start. 2. The workflow start option was not enabled to &#8220;Start workflow automatically when an item was created&#8221;. Ensure this option was checked. 3. [...]]]></description>
			<content:encoded><![CDATA[<p>There are some cases, why the workflow was not started during item creation,</p>
<p>1. If you create an item using System Account, the workflow will not funtion properly or that couldn&#8217;t start.<br />
2. The workflow start option was not enabled to &#8220;Start workflow automatically when an item was created&#8221;. Ensure this option was checked.<br />
3. If you create and publish a workflow without enabling the Start option(Start workflow automatically when an item was created). And after some time you came and enable that start option &#038; saves without Publishing also cause a problem.<br />
4. Or remove the &#8220;Allow this workflow to be manually started&#8221; start option and Initiation workflow. Enable &#8220;Start workflow automatically when an item was created&#8221; option and Publish the workflow.</p>
<p>check the following link has the soltuoions for SharePoint Designer workflows, <a href='http://office.microsoft.com/en-us/sharepoint-designer-help/troubleshoot-workflow-errors-HA010237912.aspx#BM2' title='Troubleshoot workflow Errors'>http://office.microsoft.com/en-us/sharepoint-designer-help/troubleshoot-workflow-errors-HA010237912.aspx#BM2</a><br />
If the above solutions couldn&#8217;t solve the problem, the you have to create new workflow.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ktskumar.com/blog/2011/11/why-workflow-not-started-on-item-creation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint Managed Account&#8211;Part 1</title>
		<link>http://www.ktskumar.com/blog/2011/08/sharepoint-managed-accountpart-1/</link>
		<comments>http://www.ktskumar.com/blog/2011/08/sharepoint-managed-accountpart-1/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 17:13:00 +0000</pubDate>
		<dc:creator>Shantha Kumar</dc:creator>
				<category><![CDATA[SharePoint-2010]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">http://www.ktskumar.com/blog/2011/08/sharepoint-managed-accountpart-1/</guid>
		<description><![CDATA[This is the first of my series about SharePoint Managed Account, this feature is newly introduced in SharePoint 2010. SharePoint Managed Account feature now enable us to easily manage the User accounts by means of&#160; password changing and notification for password change and automatic password reset. And also used for Configuring and mapping different accounts [...]]]></description>
			<content:encoded><![CDATA[<p>This is the first of my series about SharePoint Managed Account, this feature is newly introduced in SharePoint 2010. SharePoint Managed Account feature now enable us to easily manage the User accounts by means of&nbsp; password changing and notification for password change and automatic password reset. </p>
<p>And also used for Configuring and mapping different accounts with different services and Web Applications. Without registering the account, we can’t create a Service application and Web Applications.</p>
<p>In this post I am giving the snippet for retrieving the list of registered managed account users from the Farm.</p>
<blockquote><p>SPFarm farm = SPFarm.Local;<br />SPFarmManagedAccountCollection accounts = new SPFarmManagedAccountCollection(farm);<br />foreach (SPManagedAccount account in accounts)<br />{<br />&nbsp;&nbsp;&nbsp; Console.Write(account.Username);<br />}</p>
</blockquote>
<p>SPFarmManagedAccountCollection returns the available managed accounts from the given farm. </p>
<p>SPManagedAccount has the list of properties of the registered account. By using those properties we can set the password reset schedule, etc..</p>
<p>Here I am just displaying only Username property of the Registered Account.</p>
<p>Coming posts I’ll come up with an interesting stuff with Managed Accounts, Stay tune my blog…</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ktskumar.com/blog/2011/08/sharepoint-managed-accountpart-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hide Fields in List Forms</title>
		<link>http://www.ktskumar.com/blog/2011/08/hide-fields-in-list-forms/</link>
		<comments>http://www.ktskumar.com/blog/2011/08/hide-fields-in-list-forms/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 14:22:51 +0000</pubDate>
		<dc:creator>Shantha Kumar</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[List Pages]]></category>
		<category><![CDATA[spField]]></category>

		<guid isPermaLink="false">http://www.ktskumar.com/blog/2011/08/hide-fields-in-list-forms/</guid>
		<description><![CDATA[We have three types of List Forms in SharePoint., New Form, Edit Form and Display Form. For some times or in some requirements, we need to hide some of the fields in List Forms. By OOB there is no page or option for hiding fields on separate form, but we can hide the fields in [...]]]></description>
			<content:encoded><![CDATA[<p>We have three types of List Forms in SharePoint., </p>
<p>New Form, Edit Form and Display Form. </p>
<p>For some times or in some requirements, we need to hide some of the fields in List Forms. By OOB there is no page or option for hiding fields on separate form, but we can hide the fields in all forms in List.</p>
<p>I am just giving snippet to hide the Fields in each separate form, separately,</p>
<p>using (SPSite site = new SPSite(&#8220;<a href="http://localhost&quot;))">http://localhost&#8221;))</a><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using (SPWeb web = site.OpenWeb())<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SPList list = web.Lists.TryGetList(&#8220;Custom&#8221;);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SPField field = list.Fields.GetFieldByInternalName(&#8220;field1&#8243;);<br /><font color="#008040">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //To hide the field from New Form<br /></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; field.ShowInNewForm = false;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#008040">//To hide the field from Edit Form<br /></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; field.ShowInEditForm = false;&nbsp; <br /><font color="#008040">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //To hide the field from Display Form</font><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; field.ShowInDisplayForm = false;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; field.Update();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p>We can also show / hide the fields based on content Types. For Content Types, we can retrieve the field from Content Type.</p>
<p>SPField field = list.ContentTypes[“ctype1”].Fields.GetFieldByInternalName(&#8220;field1&#8243;);</p>
<p>and the add the further lines to hide the field in SharePoint Lists.</p>
<p>For revert back, we can set the ShowInNewForm&nbsp; property as true.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ktskumar.com/blog/2011/08/hide-fields-in-list-forms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inherit / Stop Web Site Top-Level Navigation</title>
		<link>http://www.ktskumar.com/blog/2011/08/inherit-stop-web-site-top-level-navigation/</link>
		<comments>http://www.ktskumar.com/blog/2011/08/inherit-stop-web-site-top-level-navigation/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 00:31:00 +0000</pubDate>
		<dc:creator>Shantha Kumar</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Tips]]></category>
		<category><![CDATA[Navigation]]></category>

		<guid isPermaLink="false">http://www.ktskumar.com/blog/2011/08/inherit-stop-web-site-top-level-navigation/</guid>
		<description><![CDATA[We have two option on Top Link bar navigation, either we can inherit the Top-Link bar from the parent site or use the own Top-Level navigation. Sharing the Top-link bar can be achieved through browser interface by navigating, 1) Site Actions –&#62; Site Settings 2) On Site Settings page, under Look and Feel section, click [...]]]></description>
			<content:encoded><![CDATA[<p>We have two option on Top Link bar navigation, either we can inherit the Top-Link bar from the parent site or use the own Top-Level navigation.</p>
<h6><font color="#307eb8">Sharing the Top-link bar can be achieved through browser interface by navigating,</font></h6>
<p>1) Site Actions –&gt; Site Settings</p>
<p>2) On Site Settings page, under Look and Feel section, click Top link bar</p>
<p>3) On Top Link bar page, Click <strong>Use Links from Parent</strong> and then Click OK in pop-up box to share the Top-Links between Sites.</p>
<p>or</p>
<p>3) On Top Link bar page, Click <strong>Stop Inheriting Links</strong> to stop the Shared links between sites and used to have the own Top-Links for the site.</p>
<h6><font color="#307eb8">The following section contains the code to achieve the Share and Stop the inheriting links</font></h6>
<p><strong>Code allows to Share the Top-Level links between all the sub-sites under Top Level Site </strong></p>
<blockquote><p>using (SPSite site = new SPSite(&#8220;<a href="http://localhost&quot;))">http://localhost&#8221;))</a><br />{<br />&nbsp;&nbsp;&nbsp; SPWeb web = site.RootWeb;<br />&nbsp;&nbsp;&nbsp; <font color="#008040">//We can&#8217;t able to Set true to top level site or root site</font><br />&nbsp;&nbsp;&nbsp; foreach (SPWeb subweb in web.Webs)<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#008040">//Check if the subsite&nbsp; not Sharing the Top-Links<br /></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!subweb.Navigation.UseShared)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; subweb.Navigation.UseShared = true;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; subweb.Dispose();<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; web.Dispose();<br />}</p>
</blockquote>
<p><strong>Code allows to Stop the Top-Level links between all the sub-sites under Top Level Site </strong></p>
<blockquote><p>using (SPSite site = new SPSite(&#8220;<a href="http://localhost&quot;))">http://localhost&#8221;))</a><br />{<br />&nbsp;&nbsp;&nbsp; SPWeb web = site.RootWeb;<br />&nbsp;&nbsp;&nbsp; foreach (SPWeb subweb in web.Webs)<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#008040">//Check if the subsite already Shared the Top-Links</font><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (subweb.Navigation.UseShared)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; subweb.Navigation.UseShared = false;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; subweb.Dispose();<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; web.Dispose();<br />}</p>
</blockquote>
<p><em></em>&nbsp;</p>
<p><em>We don’t need to call SPWeb.Update() to update the Link Sharing.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ktskumar.com/blog/2011/08/inherit-stop-web-site-top-level-navigation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

