Solved

Another agent question

Posted on 2006-10-31
2
200 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
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…

747 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