简体   繁体   中英

Sharepoint. How can I get the “New” flag of a list item?

I am novice in development for Sharepoint. I need to get the "New" flag of list item, which appears after a new document added, using C#. Is this a property of SPListLitem class or something else?

Thank you!

The !New icon appears next to a list item based on the value set in STSADM

stsadm.exe -o setproperty -pn days-to-show-new-icon -pv 0 -url [Your Virtual Server's URL] http://blog.u2u.info/DottextWeb/patrick/archive/2005/05/27/3010.aspx

I think the default will be 1 day. This is based on the created date. The best way to return list items / documents based on this property is to set the stsadm command and then use CAML to query the items in a list using a date. Have a look at "Dates and CAML" http://blog.u2u.info/DottextWeb/patrick/archive/2005/05/27/3010.aspx

That means, that it is programmtically not possible.

Copied from https://social.msdn.microsoft.com/Forums/sharepoint/en-US/96af4647-48a4-4a86-862d-29efd1fed956/programmatically-get-list-items-that-marked-with-new-icon?forum=sharepointdevelopmentlegacy . Thanks to Dave Hunter.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM