02-25-2011 04:53 AM
I bumped into an issue when attempting to parse international phones using Act! SDK.
Here is a situation: a German customer / contact is assigned a "home phone" number "123 456 7890". Germany's country code +49 is applied through the formatting - the standard mini-box that shows up when we click on the ellipsis nearby "..." (picture attached).
However, whenever I read the contact's "home phone" value through Act! SDK, all I see is 123 456 7890. My goal is to get the full phone value somehow so that it would include the country code:  123 456 7890.
The question: how do I read the phone's country value, not just the phone number itself? Is it a special field or a special attribute under the Contact object? I looked at all possible properties, fields and methods there... but couldn't find anything useful.
So any hints or insights would be greatly appreciated.
We are using Act! 2010 Premium.
02-25-2011 01:18 PM
The PhoneNumber class has a public property of Country Code, once you've captured a phone number you should be able to get/set it's country code. If you have any issues let me know.
06-17-2014 06:26 AM
PhoneNumber Class did not help me.
I have got CurrentContact value from Application.ApplicationState.CurrentContact. I need to recieve a full phone number (including country code) for this contact but i do not see any property in thos class to assign to PhoneNumber class. I tried to do the following:
Contact contact = application.ApplicationState.CurrentContact;
string phonenum = contact.ContactFields["Contact.Phone"].ToString();
Act.Framework.Phones.PhoneNumber PhoneNum = application.ActFramework.PhoneManager.GetPhoneNumberFromString(phonenum, contact);
This code does not give desired result. Can you please say what i am doing wrong? Probably some other class or function should be used.