Advertisement

09.22.2005 at 01:52PM PDT, ID: 21571100
[x]
Attachment Details

How to get the field name from either the exit event or elsewhere for generic auditing

Asked by SysExpert in Lotus Notes

Tags: field, names

I have a number of similar fields that need to have auditing.
I would like to use  generic code in each, so that maintenence will be low.
How do I obtain the name and value of a field in the Exit Event, or alternatively, how would I do auditing generically.

Thanks !


Sub Exiting(Source As Field)
      Dim s As New notessession
      Dim uiw As New notesuiworkspace
      Dim uidoc As notesuidocument
      Set uidoc=uiw.currentdocument
      
      Dim TStr As String, FldName As String
      
'Check uidoc is in edit mode
      
      uidoc.editmode=True
      
'Ammend Audit Trail
      
      AuditName=uidoc.fieldgettext("AuditName")
      AuditDate=uidoc.fieldgettext("AuditDate")
      AuditDetails=uidoc.fieldgettext("AuditDetails")
      
      AuditName=s.commonusername+Chr(10)+AuditName
      AuditDate="["+Str(Now)+"]"+Chr(10)+AuditDate
      AuditDetails="Fld x chnged to" + Tstr+Chr(10)+AuditDetails
      
      uidoc.fieldsettext "AuditName",AuditName
      uidoc.fieldsettext "AuditDate",AuditDate
      uidoc.fieldsettext "AuditDetails",AuditDetails
      
End SubStart Free Trial
 
Loading Advertisement...
 
[+][-]09.22.2005 at 11:58PM PDT, ID: 14942440

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.23.2005 at 06:10AM PDT, ID: 14943835

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Lotus Notes
Tags: field, names
Sign Up Now!
Solution Provided By: sjef_bosman
Participating Experts: 3
Solution Grade: A
 
 
[+][-]09.23.2005 at 10:35AM PDT, ID: 14946556

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.27.2005 at 08:36AM PDT, ID: 14967569

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32