Integra for Notes Banner
  QuickReports Integra4Notes Integra Family of Products



How to add Readers field to Notes documents created by Integra

To limit the access of a new documents created by Integra via the "Save as Document" option you will need to add readers to the new document. This can be achieved using lotus script in the "advanced script" section of the profile.

The example below allows these persons to access the document: Mark Brown, the person running the Integra report and those who have the "[Acme]" role to the database.
     Const CB_INITIALISE = 3
     Const CB_ACTIONONLY = 16
     Const CB_BFOREXPORT = 10
     Const CB_INVALID = 12
     Const CB_CATEGORY = 13
     Const CB_TOTAL = 14
     Const CB_CONFLICT = 15
     Const CB_BFORREADNOTES = 6
     Const CB_BFORWRITECOM = 1
     Const CB_AFTERWRITECOM = 9
     Const CB_BFORCOMACTION = 5
     Const CB_BFORNOTESACTION = 2
     Const CB_TERMINATE = 4
     
     Select Case stats.cbstatus
     Case CB_INITIALISE
     Case CB_ACTIONONLY
     Case CB_BFOREXPORT
     Case CB_INVALID
     Case CB_CATEGORY
     Case CB_TOTAL
     Case CB_CONFLICT
     Case CB_BFORREADNOTES
     Case CB_BFORWRITECOM
     Case CB_AFTERWRITECOM
     Case CB_BFORCOMACTION
     Case CB_BFORNOTESACTION
          If Not stats.savdoc Is Nothing Then
               ' before save as
               Const ReadersFieldName = "rf" 'where rf is the name of the readers field on the document
               Dim reader(2)  As String
               Dim session      As New NotesSession
               Dim nm              As NotesName 'remove this if you wish to use the full notes name

               Set nm = New NotesName(session.UserName) 'remove this if you wish to use the full notes name
	
               reader(0) = "Mark Brown"
               reader(1) = "[Amce]"
               reader(2) = nm.Common 'use session.username if you wish to use the full notes name

	          If Not stats.savdoc.HasItem(ReadersFieldName) Then 
		Dim readeritem  As New NotesItem(stats.SavDoc, ReadersFieldName,reader, READERS)
	          Else
		stats.SavDoc.Rf = reader 'where rf is the name of the readers field on the document
	          End If

          Else
             ' before send to
          End If
     Case CB_TERMINATE
     End Select

.




FAQ# 0238
Bookmark and Share

 
QUICK LINKS
 
 

 

  © Shireburn Software Ltd. 2008 - 2024