Community
Showing results for 
Search instead for 
Do you mean 
Reply

Retrieving the Private Contacts for a user

New Member
Posts: 31
Country: USA

Retrieving the Private Contacts for a user

   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)
 

Bronze Elite Contributor
Posts: 2,115
Country: United_Kingdom

Re: Retrieving the Private Contacts for a user

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

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog
New Member
Posts: 31
Country: USA

Re: Retrieving the Private Contacts for a user

I tried that and I got the error: "Value does not match the column's datatype"

 

Any other ideas?