如何检索“记录活动” Lotus Notes 数据库的标志?
我想检索 Lotus Notes 数据库的“记录活动”标志,如屏幕截图所示(请参阅左下角的复选框)。我怎样才能通过 API 做到这一点?
I would like to retrieve the "Record activity" flag of Lotus Notes database, shown in the screenshot (see the checkbox in the bottom-left corner). How can I do that through API?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
更新:
仅通过 LotusScript 无法做到这一点,但也许您可以通过 Lotus Notes C API 获取此信息。
NSFDbGetUserActivity 方法将返回用户活动信息(显示在该对话框中),或者如果没有摘要信息,它将返回
ERR_SPECIAL_ID
。这不是确定是否检查记录活动标志的精确方法,但您可以从该方法的结果推断标志的状态。当然,仍然有可能标记已被检查,但尚未记录任何活动,或者相反,标记未检查,但活动先前已记录在数据库中。
另一种解决方案可能是以编程方式执行通常会记录在用户活动中的操作。然后,您可以检查该活动是否确实被记录,然后您就可以知道该标志是否处于活动状态。如果您指定一个特殊的 Notes 用户来运行此代码,则可以更轻松地从活动列表中挑选出该用户,从而避免由某些正常的最终用户活动引起的误报。
下面的代码向您展示了如何通过 C API 获取用户活动信息,取自本教程页面上的示例 #3: http://www.triplewhitefox.com/tech-calling-c-api-from-lotusscript
(声明)
初始化
UPDATE:
No way to do so via LotusScript alone, but perhaps you can get this information via the Lotus Notes C API.
The NSFDbGetUserActivity method will either return the user activity information (shown in that dialog) or it will return
ERR_SPECIAL_ID
if there is no summary information. This is not a precise way to determine whether the record activity flag is checked, but you could infer the state of the flag from the result of the method.Of course, there's still the chance the flag is checked, but no activity has been recorded yet, or conversely the flag is not checked but activity was previously recorded in the database.
Another solution may be to programmatically perform an action that would normally get recorded in the User Activity. You could then check to see if that activity is in fact recorded, and you'd then know whether that flag was active or not. If you dedicate a special Notes user to run this code, it would be easier to pick out that user from the list of activities avoiding a false positive caused by some normal end-user activity.
The code below shows you how to get at the User Activity information via the C API, taken from example #3 on this tutorial page: http://www.triplewhitefox.com/tech-calling-c-api-from-lotusscript
(declarations)
Initialize
AGECOM 提供免费的 NotesUser Activity 类 (
CLASSUserActivity
) 应用程序。他们完全审查并更新了最初由 Daniel Alvers 编写的课程。Release 2x
中的改进包括:对原始代码进行了大量修复和增强。
从 LotusScript 调用 Lotus C-API 代码时更正数据类型和内存对齐。
在整个代码中实现错误处理。
增强了用于收集和显示检索到的用户活动信息的示例代理。
用于扫描所有或选定数据库中的用户活动的新选项。
用于显示用户活动信息报告的新视图。
您可以从 AGECOM 网站下载更新:
http://www.agecom.com.au/useractivity
该应用程序是一个标准的 Lotus Notes 应用程序并且可以立即从 Lotus Notes 客户端运行。
There is a NotesUser Activity class (
CLASSUserActivity
) application freely available from AGECOM. They've completely reviewed and updated the class originally written by Daniel Alvers.Improvements in
Release 2x
include:Numerous fixes and enhancements to the original code.
Correction to data types and memory alignments when making calls to Lotus C-API code from LotusScript.
Implementation of error handling throughout the code.
Enhancement to sample agent for collection and displaying retrieved user activity information.
New options to scan user activity in all or selected databases.
New views to show reports of user activity information.
You can download the update from the AGECOM website at:
http://www.agecom.com.au/useractivity
The application is a standard Lotus Notes application and can be run immediately from the Lotus Notes client.