12-21-2011 08:00 AM - edited 12-21-2011 08:01 AM
Hi,
I'm trying to return a list of users FullName in one of my own forms. Here's the code I'm using
ContactList oContacts;
oContacts = application.ActFramework.Contacts.GetContactsUsers(null);
foreach (Act.Framework.Contacts.Contact oContact in oContacts)
{
MessageBox.Show(oContact.FullName);
}
When I put this code in the AfterLogin event it works perfectly fine. However, If I attempt to execute after opening my form (from a custom menu item) I get an "object reference not set" error.
Debugging shows the oContact.FullName is returning null but I can't see why.
Does anyone have a solution?
12-30-2011 09:39 AM