05-19-2008 06:49 PM
I am trying to retrieve ONLY the private contacts for a user using the code below. However, every time I execute the ACTFM.Lookups, I get a message ""val is not of the type string, string[] or ValueEnum", basically referring that the variable bolTrue should be a string. However, if I use the string "True", it then complains that the column is not of the same type. What can I change here that will make the lookup succeed, i.e. to get a list of private contacts for the logged user.
PrivateFieldDescriptor = ACTFM.Contacts.GetContactFieldDescriptor("TBL_CONTACT.ISPRIVATE", True)
Dim cLookup As Act.Framework.Lookups.ContactLookup
Dim bolTrue As Boolean = True
cLookup = ACTFM.Lookups.LookupContactsReplace(bolTrue, Act.Framework.Lookups.OperatorEnum.EqualTo, PrivateFieldDescriptor, True, True)
ourContactList = cLookup.GetContacts(Nothing)
05-20-2008 08:15 AM
Hi thatch,
try replacing the line
cLookup = ACTFM.Lookups.LookupContactsReplace(bolTrue, Act.Framework.Lookups.OperatorEnum.EqualTo, PrivateFieldDescriptor, True, True)
with the following line
cLookup = ACTFM.Lookups.LookupContactsReplace(Act.Framework.Lookups.ValueEnum.True, Act.Framework.Lookups.OperatorEnum.EqualTo, PrivateFieldDescriptor, True, True)
Hopefully it should work then.
HTH,
Vivek
05-20-2008 03:23 PM
I tried that and I got the error: "Value does not match the column's datatype"
Any other ideas?