SIGN UP MEMBER LOGIN:    
ARTICLE

New Icon Indicator in SharePoint 2010

Posted by Vijai Anand Articles | SharePoint June 24, 2011
In SharePoint, when a new item is created in the list or library a new icon will appear. In this article we will be seeing how to change the duration of the new icon and how to delete the new icon for the list or library.
Reader Level:

Introduction:
In SharePoint, when a new item is created in the list or library a new icon Untitled-1.gifwill appear. In this article we will be seeing how to change the duration of the new icon and how to delete the new icon for the list or library.

  • Set the duration of the new icon.
  • Remove the new icon.

Set the duration of the new icon:

In this section, we will be seeing how to set the duration of the new icon using object model and PowerShell.

Using Object Model:

using System;
using System.Collections.Generic;
using
System.Linq;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;
namespace NewIcon
{
    class Program
    {
        static void Main(string[] args)
        {
            SPWebApplication webApp = SPWebApplication.Lookup(new Uri("http://serverName:1111/"));
            Console.WriteLine(webApp.DaysToShowNewIndicator.ToString());
            webApp.DaysToShowNewIndicator = 3;
            webApp.Update();
            Console.WriteLine(webApp.DaysToShowNewIndicator.ToString());
            Console.ReadLine();
        }
    }
}

Using PowerShell:

$webApp=Get-SPWebApplication "http://serverName:1111/"

write-host -f Magenta $webApp.DaysToShowNewIndicator

$webApp.DaysToShowNewIndicator=3

$webApp.Update()

write-host -f Magenta $webApp.DaysToShowNewIndicator

Remove the new icon:

In this section, we will be seeing how to remove the new icon using object model and PowerShell.

Using Object Model:


    SPWebApplication webApp = SPWebApplication.Lookup(new Uri("http://serverName:1111/"));
    Console.WriteLine(webApp.DaysToShowNewIndicator.ToString());
    webApp.DaysToShowNewIndicator = 0;
    webApp.Update();
    Console.WriteLine(webApp.DaysToShowNewIndicator.ToString());
    Console.ReadLine();

Using PowerShell:

$webApp=Get-SPWebApplication "http://serverName:1111/"

write-host -f Magenta $webApp.DaysToShowNewIndicator

$webApp.DaysToShowNewIndicator=0

$webApp.Update()

write-host -f Magenta $webApp.DaysToShowNewIndicator

Login to add your contents and source code to this article
share this article :
post comment
 
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
    Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Nevron Gauge for SharePoint
Become a Sponsor