在Lotus Notes表单中添加日志记录 [英] Adding logging in Lotus Notes form

查看:203
本文介绍了在Lotus Notes表单中添加日志记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的Lotus Notes应用程序中添加日志记录功能.基本上,我希望能够记录谁进行更改,何时进行更改以及文档中更改了哪些字段.做这个的最好方式是什么?我正在考虑在每个文档的末尾添加此内容,以便用户知道谁进行了更改.

I want to add logging capabilities in my Lotus Notes application. Basically I want to be able to log who make the change, when the change is made, and what field(s) is/are changed in a document. What is the best way to do this? I am thinking to also add this at the end of each document so the user knows who make the changes.

推荐答案

在使用LotusScript之前,我已经完成了此操作.有点痛苦,但是基本的想法是:

I've done this before using LotusScript. It's a bit of a pain, but the basic idea is to:

  • 在QueryOpen事件中创建一个数组或新文档对象,并将所有项目的值存储在当前文档中.
  • 在QuerySave事件中,将当前文档的值与您创建的内存中的副本进行比较,然后记录所有差异.

您可以在表单上创建一个字段来写入这些更改,并且每次都将其追加到该字段.

You can create a field on the form to write these changes to, and just append to it each time.

请注意,每次打开文档时都要进行更改的其他事件处理程序.例如,如果您每次在文档打开时更改QueryOpen事件中的某些字段,则可能需要在PostOpen事件中复制原始值,否则会得到错误的更改日志.

Watch out for other event handlers that make changes everytime the document opens, though. You may need to copy original values in the PostOpen event, for example, if you change some fields in the QueryOpen event each time the doc opens, otherwise you'd get false change logs.

希望这会有所帮助!

这篇关于在Lotus Notes表单中添加日志记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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