Sharepoint 自定义用户和文档库特定属性
是否有将自定义属性与用户关联的标准方法? 我需要分别为每个用户和文档库存储用户在文档库网格中选择的每页项目数。
编辑:
对于这种模糊性感到抱歉,我想以编程方式进行此操作。 看来我已经找到了解决方案,它是 UserProfileManager 类,尽管我现在正在研究可以通过这种方式为用户保存的属性数量是否有限制,因为在每个用户+文档库的基础上保存页面大小的最简单方法似乎使用视图的 GUID 作为属性名称,使用页数作为值。 虽然我不知道它是否更有效,但这取决于 sharepoint 如何存储这些属性。
Is there a standard way to associate custom properties with a user? I need to store the number of items per page a user selected in a grid of a document library separately for each user and document library.
Edit:
Sorry about this vagueness, I wanted to do it programmatically. It seems like I've found the solution, it is UserProfileManager class, though I'm now looking into whether there is a limitation on the number of properties you can save this way for a user, because the easiest way of saving page sizes on per user+document library basis seems to be using GUIDs of Views as property names and numbers of pages as values. Though I don't know if it is more efficient or not, depends on how sharepoint stores these properties.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不,您需要创建自定义代码来存储数据。
考虑到创建的潜在数据量,将其存储在单独的数据库中可能是明智的。
这将为操作和检索数据的方式提供更大的灵活性。
No, you would need to create custom code to store the data.
Given the potential amount of data created, it may be wise to store it in a separate database.
This would give greater flexibility in the way the data can be manipulated and retrieved.
你的问题有点模糊。 您正在寻找任何自定义代码吗? 您可以通过多种方式做到这一点,因此如果不了解更多您想要什么,就很难做到这一点。
使用自定义代码,您可以设置工作流程或事件处理程序来响应项目事件并记录信息并使用用户配置文件或作为 SPPersistedObject 进行存储。
如果您想要一种不太以开发人员为中心的方式来完成此操作,您可以使用审核并简单地报告审核结果。
Your question is a bit vague. Are you looking to do any custom code? You could do this many ways so it is difficult without knowing more of what you want.
Using custom code you could set up a workflow or event handler to respond to item events and record the information and store it using the User's Profile or as an SPPersistedObject.
If you want a less developer centric way to do it you can use auditing and simply do reporting on your audit results.
您可以设置一个列表来存储选择数据,然后在文档列表上使用事件/AJAX 将勾选/取消勾选项目推送到选择列表中(至少存储用户、库和文档。
如果您不想单独使用列表,您可以在文档库中创建一个字段来存储哪些用户标记了给定文档...当用户勾选/取消勾选该框时,您仍然需要某种事件/AJAX 来更新列表:)
You could set up a list to store the selection data, then use events/AJAX on the document list to push tick/untick items into the selection list (store user, library and document as a minimum.
If you don't want a separate list, you could create a field in your document library that stores which users have a given document tagged... You'll still need some kind of event/AJAX to update the list when a user ticks/unticks the box. Crude :)