Solved

Another agent question

Posted on 2006-10-31
2
202 Views
Last Modified: 2013-12-18
I want to create an agent that will send out a monthly reminder message to those in the Access Control List.  How?
0
Comment
Question by:schmad01
2 Comments
 
LVL 63

Accepted Solution

by:
SysExpert earned 50 total points
ID: 17845865
All you need to do is open the DB, set the ACL entries and collect all the users and put them into the sendto filed of a memo
Dim rdoc As NotesDocument

You will not need most of the ACL entry stuff, just the name, but you may decide that the other info is useful.

I hope this helps !

-------------------------------------------

            Set rdoc = GetACLInfo(db, parentDoc)
                  Call GetACLEntries(db.ACL, rdoc)

Function GetACLEntries(acl As NotesACL, parentDoc As NotesDocument) As Boolean
      On Error Goto GetACLEntries_Error
      GetACLEntries = False
      Dim aclentry As NotesACLEntry
      Dim dbdoc As NotesDocument
      
      Set aclentry = acl.GetFirstEntry()
      Do Until (aclentry Is Nothing)
            Set dbdoc = New NotesDocument(session.CurrentDatabase)
            'Call CreateLog(0, "DEBUG: Creating ACLEntry document '" & dbdoc.UniversalID & "' for " & acl.Parent.Title & "...", LOG_DEBUG)
            
            dbdoc.Form = "ACLEntry"
            If aclentry.CanCreateDocuments Then
                  dbdoc.CanCreateDocuments = "-1"
            Else
                  dbdoc.CanCreateDocuments = "0"
            End If
            ' etc... for all properties that returns a boolean!!
            dbdoc.CanCreateLSOrJavaAgent = aclentry.CanCreateLSOrJavaAgent
            dbdoc.CanCreatePersonalAgent = aclentry.CanCreatePersonalAgent
            dbdoc.CanCreatePersonalFolder = aclentry.CanCreatePersonalFolder
            dbdoc.CanCreateSharedFolder = aclentry.CanCreateSharedFolder
            dbdoc.CanDeleteDocuments = aclentry.CanDeleteDocuments
            dbdoc.CanReplicateOrCopyDocuments = aclentry.CanReplicateOrCopyDocuments
            dbdoc.IsAdminReaderAuthor = aclentry.IsAdminReaderAuthor
            dbdoc.IsAdminServer = aclentry.IsAdminServer
            dbdoc.IsGroup = aclentry.IsGroup
            dbdoc.IsPerson = aclentry.IsPerson
            dbdoc.IsPublicReader = aclentry.IsPublicReader
            dbdoc.IsPublicWriter = aclentry.IsPublicWriter
            dbdoc.IsServer = aclentry.IsServer
            dbdoc.Level = Cstr(aclentry.Level)
            dbdoc.Name = aclentry.Name
            dbdoc.Roles = aclentry.Roles
            dbdoc.UserType = aclentry.UserType
            
            Call dbdoc.MakeResponse(parentDoc)
            Call dbdoc.Save(True,False,False)
            
            Set aclentry = acl.GetNextEntry(aclentry)
      Loop
      GetACLEntries = True
      'Call CreateLog(0, "GetACLEntries successfully completed.", LOG_SUCCESS)
      
GetACLEntries_Exit:
      Exit Function
GetACLEntries_Error:
      Error Err, Error$ & " (GetACLEntries)"
      Resume GetACLEntries_Exit
      
End Function
0
 

Author Comment

by:schmad01
ID: 17858257
I can work with that. Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
A short film showing how OnPage and Connectwise integration works.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now