防止同时编辑列表项

发布于 2024-08-10 14:20:10 字数 127 浏览 1 评论 0原文

在 Sharepoint MOSS 中,多个用户可以同时编辑共享点列表中的同一项目……第一个保存编辑的人“获胜”。

有没有办法防止这种情况,在编辑时锁定列表项?

注意:这是指自定义列表 - 不是文档库中的文档

In Sharepoint MOSS multiple users can edit the same item in a sharepoint list at the same time…the first person to save their edit “wins”.

Is there a way to prevent this, to lock the list item while it is being edited?

NB: This refers to a custom list -Not a document in a document library

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

冰火雁神 2024-08-17 14:20:10

不可能 - 仅支持具有关联 SPFile 对象的列表项(图像、页面、文档 - 基本上从 SPDocumentLibrary 派生的所有内容)签入/签出

-Oisin

Not possible - checkin/checkout is only supported for list items with an associated SPFile object (images, pages, documents - essentially everything that derives from SPDocumentLibrary)

-Oisin

殤城〤 2024-08-17 14:20:10

有几种方法可以做到这一点,所有方法都是定制的。正如 Oisin 在他的帖子中所说,本机签入/签出引擎需要一个关联的文件。

想法:

Javascript

  • 修改EditForm.aspx文件,嵌入列表模板中,XmlHttpRequest检查“签出项目列表”存储库,10后过期/删除检查当前编辑文件的用户有 20 分钟不活动。

.NET

  • 事件处理程序:我还没有检查过,但如果修改日期自您打开项目以来发生了变化,则 ItemUpdating 事件类型可能会阻止您更新它,说明该项目在编辑时已被修改,需要进行更新。已更新(克隆 SharePoint 中 aspx/发布页面的行为)

Infopath

  • 我注意到您说您没有企业版,但您的用户仍然可以在其计算机上安装 InfoPath 客户端并在本地填写表单。

现在让我们开始享受乐趣吧:)

空文档模板

  • 您可以用自己的方式创建一个超级“添加项目”按钮,该按钮上传/创建带有空文档 (.txt) 的新文档库项目并重定向用户直接进入“编辑属性”表单。当我用文档库替换“我的网站”配置文件中的“更改图像”时,我做到了这一点。

Word 文档

  • Word 2007 可以创建类似于表单的文档,用户只能准确填写所需的字段,Excel 也可以(Infopath 的创建是因为用户将这些程序用于表单)。

There are a few ways to do that, all custom. As Oisin said on his post the native check-in/check-out engine needs a file associated.

Ideas:

Javascript

  • Modified EditForm.aspx file, embedded in a List Template, XmlHttpRequest checks for a "Checked-out Items List" repository, expires/remove the check after 10-20 minutes of inactivity from the user currently editing the file.

.NET

  • Event Handlers: I have not checked but the ItemUpdating Event Type could stop you from updating it if the Modified date changed since you opened the item, saying the item was modified while being edited and need to be updated (cloning the behavior of aspx/publishing pages in SharePoint)

Infopath

  • I noticed you said you dont have the enterprise version, still your users could have the InfoPath client on their machines and fill the form locally.

Now lets start the fun :)

Empty Document Template

  • You can hack your way to create a super "Add Item" button that uploads/creates a new Document Library Item with an empty document (.txt) and redirect the user directly to the Edit Properties form. I did this when I replaced the "Change Image" in the My Sites profile with a Document Library.

Word Document

  • Word 2007 can create documents similar to forms where the user can only fill the exact fields you want, so can excel (Infopath was created because users were using these programs for forms).
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文