Hello,
I hope I can find an answer to my issue here.
Actually I can't send Query with Arabic Characters through API.
I tried to send the query using the arabic letters as the following:
select * from Customer Where DisplayName = 'اØÙ…د عبدالعزيز'
it returns:
{ "responseHeader": { "status": 400, "message": "Bad Request", "intuitTid": "2dbec1fd-5dc1-3a14-4a12-7c338db0ee2a", "realmID": "123146420719144" }, "response": { "Fault": { "Error": [ { "Message": "Error parsing query", "Detail": "QueryParserError: Invalid content. Lexical error at line 1, column 45. Encountered: \"\\u0627\" (1575), after : \"\\'\"", "code": "4000" } ], "type": "ValidationFault" }, "time": "2019-07-04T07:09:03.026-07:00" } }
And if I try it after URL encoding the name and send the query as the following:
select * from Customer Where DisplayName = '%D8%A7%D8%AD%D9%85%D8%AF+%D8%B9%D8%A8%D8%AF%D8%A7%D9%84%D8%B9%D8%B2%D9%8A%D8%B2'
it returns:
{ "QueryResponse": {}, "time": "2019-07-04T07:09:42.698-07:00" }
However, Entering an Arabic name manually to the invoice is OK without any issues. I have no idea why it doesn't work with API.
Also I noticed even if the Query is in English it results the same.
For example;
select * from Customer Where DisplayName = 'ahmed a'
The result is as expected:
{ "QueryResponse": { "Customer": [ { "Taxable": false, "BillAddr": { "Id": "556", "Country": "السعودية" }, "ShipAddr": { "Id": "557", "Line1": "الرياض", "City": "الرياض", "Country": "السعودية", "CountrySubDivisionCode": "منطقة الرياض - داخل مدينة الرياض", "PostalCode": "١٣٢٤٧" }, "Job": false, "BillWithParent": false, "Balance": 0, "BalanceWithJobs": 0, "CurrencyRef": { "value": "SAR", "name": "Saudi Riyal" }, "PreferredDeliveryMethod": "None", "IsProject": false, "domain": "QBO", "sparse": false, "Id": "435", "SyncToken": "0", "MetaData": { "CreateTime": "2019-06-21T23:20:09-07:00", "LastUpdatedTime": "2019-06-22T15:28:33-07:00" }, "GivenName": "ahmed", "FamilyName": "a", "FullyQualifiedName": "ahmed a", "DisplayName": "ahmed a", "PrintOnCheckName": "ahmed a", "Active": true, "PrimaryPhone": { "FreeFormNumber": "0566699020" } } ], "startPosition": 1, "maxResults": 1 }, "time": "2019-07-05T03:25:48.733-07:00" }
and another one:
select * from Customer Where DisplayName = 'Ahmed Al-Khuraisir'
It returns nothing as below:
{ "QueryResponse": {}, "time": "2019-07-05T03:31:11.149-07:00" }
Please check the images attached. Both client names are already existed.