Showing results for 
Search instead for 
Do you mean 

Obtaining the contact's telephone number

New Member
Posts: 6
Country: UK

Obtaining the contact's telephone number

first post - apologies for being a noob, trying to add a custom control button to tie-in telephone dialling to an old SDX system.. I've looked through all the SDK and from the cookbook examples have implemented a custom control button which shows up on each contact record, but need help where to look to actually retrieve the contact's phone number from ACT? using the Contact class: "Contact currentContact = listManager.Current as Contact;" lets me access the contact's fields such as first and last name, but phone numbers are eluding me?? Thanks Mark
Copper Contributor
Posts: 98
Country: United States

Re: Obtaining the contact's telephone number

Hey Mark,
Sounds like you're in need of the ContactFieldDescriptor methods.
'Example 2
'This example demonstrates how to get and set the value of a contact field.
'Declare our variables.

Dim cField As ContactFieldDescriptor
Dim cContact As Contact
Dim oValue As Object
'Assign the myrecord to our Contact object.
cContact = ActFwk.Contacts.GetMyRecord()
'Get the contact field descriptor for the user 1 field.
cField = ActFwk.Contacts.GetContactFieldDescriptor("TBL_CONTACT.USER1")
(((This example expaned on and continued in the Code Samples.chm - act.framework > Act.Framework.Contacts.ContactManager)))
For a the default Phone field: "TBL_CONTACT.BUSINESS_PHONE"
Carlton Jones
Sage Software
New Member
Posts: 6
Country: UK

Re: Obtaining the contact's telephone number

Thanks Carlton,

I had looked at that but got nowhere before, but after a little perseverance tonight i found it was because I needed to tie the framework to the ContactListComponent like:

ActFramework ActFwk = ContactListComponent.FrameworkComponent.Framework;

once this was done, the GetContactFieldDescriptor worked perfectly :-)

Many Thanks