User Roles through Back-end

I am having a view with documents created by different employees.In the database ACL, i have created different groups, and all employees are distributed in different groups.

I want to add a new field (named rolesList) which will contain employee roles in those document through back-end agent.

I have created one agent which is extracts employee name from each document and depending on name i m using NotesACL class function (The agent code is given at last)

I have used getEntry() method of NotesACLEntry class. But i am not getting the roles of particular employees

can u give me proper guidance

The agent code is as follows

Dim session As New NotesSession

Dim db As NotesDatabase

Dim currdoc As notesdocument

Dim coll As NotesDocumentCollection

Dim emp As String

Dim acl As NotesACL

Dim nName As NotesName

Dim entry As NotesACLEntry

Dim varRoles As Variant

Set db =session.CurrentDatabase

Set coll= db.UnprocessedDocuments

Set acl = db.ACL

If (coll.count>0) Then

Set currdoc=coll.GetFirstDocument

While Not ( currdoc Is Nothing)

       emp=currdoc.EREmployee(0)

       Set nName=session.CreateName(emp)

       Set entry = acl.GetEntry(nName.Canonical)

      ' The entry variable is not set		

      Set currdoc=coll.GetNextDocument(currdoc)

Wend

End If

Subject: User Roles through Back-end

use db.QueryAccessRoles(username) instead of using acl.GetEntry(username)

Subject: User Roles through Back-end

Use isroleenabled property of notesaclentry class.