Usin API V3 for QBD, getting error:
Invalid field value PrimaryPhone: Invalid telephone number: [(555) 555-6286 x112]</Message>
The spec for this states it is a free form number with a max length of 21. So why is this not valid?
Using the API Explorer directly gives this error.
It should be considered as a bug.
Using devkit/apiexplorere, I tried the following.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Customer xmlns="http://schema.intuit.com/finance/v3">
<DisplayName>TEL_CUST_DK</DisplayName>
<PrimaryPhone>
<FreeFormNumber>[(555) 555-6286 x112]</FreeFormNumber>
</PrimaryPhone>
</Customer>
I got the similar exception.
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2014-03-20T04:09:34.675Z">
<Fault type="Validation">
<Error code="-4000">
<Message>Operation failed with errors:
Invalid field value PrimaryPhone: Invalid telephone number: [[(555) 555-6286 x112]]</Message>
</Error>
</Fault>
</IntuitResponse>
But when I created a new customer in QB and retrieved the same using V3 endpoint, then it worked as expected.
Response
<Customer status="Synchronized">
<Id>QB:190</Id>
<SyncToken>1</SyncToken>
<MetaData>
<CreateTime>2014-03-20T03:41:51Z</CreateTime>
<LastUpdatedTime>2014-03-20T03:44:07Z</LastUpdatedTime>
</MetaData>
<Organization>false</Organization>
<DisplayName>TEL_CUST</DisplayName>
<Active>true</Active>
<PrimaryPhone>
<FreeFormNumber>(555) 555-6286 x112</FreeFormNumber>
</PrimaryPhone>
<DefaultTaxCodeRef name="Tax">QB:1</DefaultTaxCodeRef>
<ContactName>(555) 555-6286 x112</ContactName>
<Job>false</Job>
<TaxRateRef name="STax">QB:5</TaxRateRef>
<Balance>0</Balance>
<JobInfo>
<Status>None</Status>
</JobInfo>
</Customer>
for Input - [(555) 555-6286 x112]
<Customer status="Synchronized">
<Id>QB:191</Id>
<SyncToken>1</SyncToken>
<MetaData>
<CreateTime>2014-03-20T03:56:13Z</CreateTime>
<LastUpdatedTime>2014-03-20T03:56:56Z</LastUpdatedTime>
</MetaData>
<Organization>false</Organization>
<DisplayName>TEL_CUST1</DisplayName>
<Active>true</Active>
<PrimaryPhone>
<FreeFormNumber>[(555) 555-6286 x112]</FreeFormNumber>
</PrimaryPhone>
<Fax>
<FreeFormNumber>[(555) 555-6286 x112]</FreeFormNumber>
</Fax>
<DefaultTaxCodeRef name="Tax">QB:1</DefaultTaxCodeRef>
<ContactName>[(555) 555-6286 x112]</ContactName>
<Job>false</Job>
<TaxRateRef name="STax">QB:5</TaxRateRef>
<Balance>0</Balance>
<JobInfo>
<Status>None</Status>
</JobInfo>
</Customer>
We'll raise a support ticket for this. I'll update this post if I come to know about its fix date.
Thanks