文件夹修改日期未更新 [英] Folder Modified Date doesn't get updated

查看:418
本文介绍了文件夹修改日期未更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们让用户抱怨在同一文件夹中修改文件后,共享文档文件夹修改日期不会更新。 这是默认行为吗?还是一个bug? 是否有解决方案将修改日期显示为给定文件夹中任何文档的最后修改
日期?

We have users complaining that the Shared Document folder modified date doesn't get updated when a file is modified in the same folder.  Is this the default behavior? or a bug?  Is there a solution to show the Modified date as the last modified date of any document in a given folder?

推荐答案

文件夹基本上只是SharePoint中的另一个列表项类型 - 当您更新该项时,修改日期将更改(例如,当您更改文件夹的名称时)。但是,该文件夹中的文件本身就是项目,其修改日期
将独立于父文件夹。

Folders are essentially just another list item type in SharePoint - when you update that item the modified date will change (e.g. when you change the name of the folder). However the documents within that folder are items themselves, and their modified date will be independent of the parent folder's.

我认为实现您的要求的唯一方法是通过带有事件接收器的对象模型 - 为ItemUpdated(和ItemAdded)创建一个事件接收器,在其中你应该找到有问题项的父文件夹然后调用SPFolder.Update()
- SharePoint将更新修改日期和相应修改。

The only way I can think to implement your requirement is via the object model with an event receiver - create an event receiver for ItemUpdated (and ItemAdded), within which you should find the parent folder of the item in question then call SPFolder.Update() - SharePoint will update the modified date and modified by accordingly.

希望这有帮助!

Sam


这篇关于文件夹修改日期未更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆