When I do a call to WebServices SOAP to search FAQ, I get AHD03053:Bad where clause: Parse error at ...

Document ID : KB000112523
Last Modified Date : 30/08/2018
Show Technical Document Details
Introduction:
When I do a call to WebServices SOAP to search FAQ, I get AHD03053:Bad where clause: Parse error at ...
Question:
After migrated Service Desk 12.7 to 14.1
When I do a call to WebServices SOAP to search FAQ, I get the following error: -----spelsrvr 10057 ERROR api.spl 178 Error fetching: AHD03053:Bad where clause: Parse error at : "id IN (400113,400118,400152,400163,400167,400206,400008,400022,400026,400031,400033,400040,400046,400101,400114,400115,400207,400119,400120,400121,400122,400123,400124,400018,400021,400132,400134,4001..." (memory exhausted)

The same query worked fine on 12.7
Environment:
Windows 2012
ServiceDesk 14.1
Answer:
The change, added in 14.1, was to include the child categories along with the category id’s mentioned in the web services call. This is an important change, as previously child categories was missing from the search, which is actually a missing feature in 12.7. This code change (to include Child Categories) adds additional text to the DB query, which is making it lengthier compared to the one we used to query in 12.7. (see below comparison) We have a product level limitation for string length. When the string length exceeds the limit (approx. 4200 chars), we get the exception.

From 14.1 Onwards, faq() will fetch information from given category ID’s and their child categories.


The only way to go forward is to split the code to invoke multiple calls, when we have more than 80 Categories ID’s.
We have to reduce the list size in the list of the where clause and perform two query with two list.
"where column in (a, b, c......)"