Reader Level:
Articles

New Icon Indicator in SharePoint 2010

By Vijai Anand on June 23, 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.
  • 0
  • 0
  • 7811

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

Vijai Anand

Vijai Anand has been working in IT industry for over 5 years. He holds Bachelor's degree in Electronics and Communication Engineering. Vijai write articles and blogs related to SharePoint 2013, SharePoint 2010, Silv... Read more

COMMENT USING

Trending up