Community
Showing results for 
Search instead for 
Do you mean 
Reply

Act! Framework gives +1 as country code, I expect it to be +31

Highlighted
Copper Contributor
Posts: 216
Country: Netherlands

Act! Framework gives +1 as country code, I expect it to be +31

We have an add-on which calls an external URL with a phone number from AcT!.

Therefore, it extracts the country code via the Framework:

 

 

// telNr is for example '612345678'

Act.Framework.Phones.PhoneNumber PhoneNum = actApp.ActFramework.PhoneManager.GetPhoneNumberFromString(telNr, contact);
telNr = $"+{PhoneNum.CountryCode.ToString()} {PhoneNum.FormattedNumber}";

// on the problem machine, telNr is now '+1 612345678'
// but in Act! it has '+31' as country code and 'free form' as format. (see 'screenshot 2.png')

 

So far so good, but we have one system on which it always returns '+1', regardless of what countrycode is listed in the phone number.

In the database it also is listed correctly as +31 (The Netherlands) as far as I can see (see attacment 'screenshot telnrs.png')

 

Also, the value in the country field 'Netherlands, the' matches that with the 31-value in the WIndows registry.

 

What else can be the culprit that Act! returns +1?

Greetings,

ACT Certified Consultants
TendenZ
the Netherlands