top of page
Writer's pictureVijai Anand Ramalingam

New Icon Indicator in SharePoint 2010

Introduction: 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.

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:

  1. using System;

  2. using System.Collections.Generic;

  3. using System.Linq;

  4. using System.Text;

  5. using Microsoft.SharePoint;

  6. using Microsoft.SharePoint.Administration;

  7. namespace NewIcon

  8. {

  9. class Program

  10. {

  11. static void Main(string[] args)

  12. {

  13. SPWebApplication webApp = SPWebApplication.Lookup(newUri("http://serverName:1111/"));

  14. Console.WriteLine(webApp.DaysToShowNewIndicator.ToString());

  15. webApp.DaysToShowNewIndicator = 3;

  16. webApp.Update();

  17. Console.WriteLine(webApp.DaysToShowNewIndicator.ToString());

  18. Console.ReadLine();

  19. }

  20. }

  21. }

Using PowerShell:

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

  2. write-host -f Magenta $webApp.DaysToShowNewIndicator

  3. $webApp.DaysToShowNewIndicator=3

  4. $webApp.Update()

  5. 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:

  1. SPWebApplication webApp = SPWebApplication.Lookup(new Uri("http://serverName:1111/"));

  2. Console.WriteLine(webApp.DaysToShowNewIndicator.ToString());

  3. webApp.DaysToShowNewIndicator = 0;

  4. webApp.Update();

  5. Console.WriteLine(webApp.DaysToShowNewIndicator.ToString());

  6. Console.ReadLine();

Using PowerShell:

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

  2. write-host -f Magenta $webApp.DaysToShowNewIndicator

  3. $webApp.DaysToShowNewIndicator=0

  4. $webApp.Update()

  5. write-host -f Magenta $webApp.DaysToShowNewIndicator

0 comments

Comments


bottom of page