I have used the ACT SDK to open an ACT OLE object then create a Views object, then created a ContactView and from this used LookupField(CF_Phone,%num%) where num is a caller ID (Callers telephone number to search and display contact details) this works well if there is a match but if there is no match then ACT! displays a window stating that there is no match for the search criteria. I cannot find a way to suppress this message if there is no match. Is there any way to do this with the ACT! SDK COM (OLE)?
The end requirement is to search a number of phone fields in ACT! in each contact looking for a match, if a matching phone number is found in any phone field then the contact record should be displayed. I have the incoming caller ID passed to me as a straight string of numbers. If there is no match I do not want any message to be displayed. If this cannot be done with COM can it be done with DDE (I cannot find any info on DDE for ACT! 5 / 6) or can a query be programatically run with the caller ID telephone number passed in as a variable?
Here is the COM code written in WinBatch (sort of VB script)
;Define vales for datbase fields
CF_Phone = 35
CF_MobilePhone = 38
;Get Caller ID from clipboard
num = clipget()
;Open ACTOLE object
objApp = ObjectOpen("ACTOLE.APPOBJECT"
;Create a Views object.
objViews = objApp.Views
;Create the ContactView object.
objGroup = objViews.Create(1, "MyContact"
;Create a lookup for Caller ID variable num
Myfind = objGroup.LookupField(CF_Phone,num)
;Close object
ObjectClose(objApp)
The end requirement is to search a number of phone fields in ACT! in each contact looking for a match, if a matching phone number is found in any phone field then the contact record should be displayed. I have the incoming caller ID passed to me as a straight string of numbers. If there is no match I do not want any message to be displayed. If this cannot be done with COM can it be done with DDE (I cannot find any info on DDE for ACT! 5 / 6) or can a query be programatically run with the caller ID telephone number passed in as a variable?
Here is the COM code written in WinBatch (sort of VB script)
;Define vales for datbase fields
CF_Phone = 35
CF_MobilePhone = 38
;Get Caller ID from clipboard
num = clipget()
;Open ACTOLE object
objApp = ObjectOpen("ACTOLE.APPOBJECT"
;Create a Views object.
objViews = objApp.Views
;Create the ContactView object.
objGroup = objViews.Create(1, "MyContact"
;Create a lookup for Caller ID variable num
Myfind = objGroup.LookupField(CF_Phone,num)
;Close object
ObjectClose(objApp)