文档库中的复杂查找元数据
客户希望在数据库中找到客户名称的查找字段,作为文档库中 Word 文档的元数据。他们有一个代表一组客户的代码,其中一个应用作客户名称、元数据以及文档内的客户代码。
由于在 Word 中编辑元数据没有留下外部数据库查找等额外逻辑的空间,对吗?我们必须使用 Asp.Net 或 java 脚本调整 EditForm.aspx 以添加查找外部数据的功能。
困难的部分是我们需要让用户在打开文档之前在 SharePoint 中填写元数据。否则,用户必须创建、关闭、编辑元数据,然后重新打开文档。 SharePoint 的默认行为是首先打开文档,然后让用户在 Word 中编辑元数据。
我的第一个想法是为每种内容类型创建一个自定义操作,并将用户重定向到一个用代码创建文档的页面,然后将用户带到 EditForm 页面。或者,使用自定义操作的代码隐藏来创建文档并让用户在 EditForm 中编辑元数据。之后单击“确定”将保存元数据并显示文档本身。
然后我偶然发现了 EventRecievers 并认为这可能会解决我的问题。拦截文档的创建并将用户首先发送到 EditForm 页面。
您对此有何想法?您将如何解决这个问题?
A client wants to have a lookup field for customer name found in a database as metadata on a Word document in a document library. They have a code which represents a group of customers and one of them should be used as customer name as metadata as well as the customer code inside the document.
Since editing the metadata in Word leaves no room for extra logic like external database lookup, right?, we have to tweak the EditForm.aspx with Asp.Net or java script to add the functionality to lookup external data.
The hard part is that we need to make the user fill in the metadata in SharePoint before the document is opened. Otherwise the user must create, close, edit metadata and then re open the document. The default behavior of SharePoint is to open the document first and let the user edit the metadata inside Word.
My first thought was to create a custom action for each content type and redirects the user to a page that creates the document in code and then brings the user to the EditForm page. Alternatively use codebehind for the custom action to create the document and let the user edit metadata in the EditForm. Clicking OK after that would save the metadata and bring up the document itself.
Then I stumbled upon EventRecievers and thought that might solve my problem. To intercept the creation of the document and send the user to the EditForm page first.
What is your thoughts on this, and how would you solve this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这听起来像是业务数据目录的工作,它允许将外部数据合并到共享点列表中(即作为列)。这确实需要 SharePoint 2007 Enterprise 许可证。
This sounds like a job for the Business Data Catalog, that allows for incorporating external data inside your sharepoint lists (i.e. as a column). This does require a SharePoint 2007 Enterprise license.