?
Solved

Another agent question

Posted on 2006-10-31
2
Medium Priority
?
209 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 200 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
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: …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month10 days, 19 hours left to enroll

770 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