Community
Showing results for 
Search instead for 
Do you mean 
Reply

Phone number without prefix code

New Member
Posts: 2
Country: Switzerland

Phone number without prefix code

[ Edited ]
When I programmatically insert a new contact with phone number 061 1234567, the phone number is always displayed as [1] 061 1234567. Then I have to click on the button to the right of the phone number field and click ok in the dialog box. After that the prefix [1] is gone. How can I avoid the prefix right from the start?

Thanks in advance!


Message Edited by itcenter on 03-19-2008 12:48 AM
Copper Contributor
Posts: 98
Country: United States

Re: Phone number without prefix code

[ Edited ]
This probably has something to do with your default country phone mask.
 
Explore the PhoneManager class.
 
Try ActivateMask.
 


Message Edited by Carlton_Jones on 03-20-2008 09:46 AM
Carlton Jones
Sage Software
Copper Contributor
Posts: 136
Country: USA

Re: Phone number without prefix code

I think it has to do with your registry.
Make sure that the name "Schweitz" is listed.
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\41]
"Name"="Schweitz"
"NameResourceId"=dword:000069a1
"CountryCode"=dword:00000029
"SameAreaRule"="N0IG"
"LongDistanceRule"="N0IG"
"InternationalRule"="S00EFG"
 
We have the same thing here in The Netherlands.
 
Thanks,
Inge van Gemert
ACT! Certified Consultant
The Netherlands
inge@inkey.net
Tuned Listener
Posts: 11
Country: Switzerland

Re: Phone number without prefix code

Hi Inge

Schweiz has to be spelled without t. ;-)


On english Windows OS the phone list in the registry has english descriptions. If somone uses a german version of ACT, where the country names do not match to the list in the registry, ACT! displays a default country code of [1].

(If you would export the registry keys of a german version and import it into a english version OS ACT! would be able to match/display the right country code.)

This problem would affect every phone field of all contacts in the database.

But the problem itcenter describes, seams to occur only on programmatically inserted phone numbers. Since ACT! dispays the right country name (-> screen shoot, Schweiz without tz, and not Switzerland [41]) I suggest to assign the phone mask programmatically or to set the phone field's properties .RawNumber AND .FormatedNumber whith a "0041" in front of the phone number.

phNumber.RawNumber = "0041" & "061 1234567"
phNumber.FormatedNumber = "0041" & "061 1234567"
Reto Scherrer
Ambit AG
Switzerland
Copper Contributor
Posts: 136
Country: USA

Re: Phone number without prefix code

Yes, you could use this to take the countrycode from the My Record and then format it using:

Field As Act.Framework.Phones.PhoneNumberFieldDescriptor
Value As Act.Framework.Phones.PhoneNumber

Value.CountryCode = ACTFM.PhoneManager.GetCountryCodeFromCountry(ACTFM.PhoneManager.CountryNameFromMyRecord(True))
sPhone = Value.FormattedNumber

Inge

 

Thanks,
Inge van Gemert
ACT! Certified Consultant
The Netherlands
inge@inkey.net