06-24-2008 05:54 PM
I need to find a single contact. I have the ContactID as a string (not a guid). I use vb.net 2005. Here's the code
Dim MyGuid() As Guid
MyGuid(0) = New Guid(CID)Dim ACTGuys As Act.Framework.Contacts.ContactList
ACTGuys = ActFwk.Contacts.GetContactsByID(Nothing, MyGuid)
VB usually comes back at me with something about a guid being unable to be converted into a 1-dimensional array.
The New Guid lineis intended to convert my ContactID string into a Guid.
Thanks in advance,
Twelve/Three Marketing, Inc.
06-25-2008 05:23 AM
Looks like your code should work.... I used the code below for testing which definately works...
'log on Dim ActFwk As New Act.Framework.ActFramework ActFwk.LogOn("C:\Users\Tomdavis.ROWCOLSOLUTIONS\Desktop\TestDB\tester.pad", "admin", "") 'get a guid for testing purposes, convert to string Dim cList As Act.Framework.Contacts.ContactList = ActFwk.Contacts.GetContacts(Nothing) Dim ID As String = cList(0).ID.ToString 'convert string back to a guid Dim guid As New Guid(ID) 'convert guid to array Dim guids(0) As Guid guids(0) = guid 'get the contact list cList = ActFwk.Contacts.GetContactsByID(Nothing, guids) MsgBox(cList.Count)