Solved

Another agent question

Posted on 2006-10-31
2
207 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

688 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