Solved! Go to Solution.
After applying the ArcGIS Server 10.1 Quality Improvement Patch we're getting errors on queries using the orderByFields parameter.
query.outSpatialReference = map.spatialReference;
query.returnGeometry = false;
query.outFields = ["*"];
query.where = "1=1";
query.orderByFields = ["OBJECTID"];
The js api encodes this into the request as
orderByFields=OBJECTID <-- FAILS with "{"error":{"code":400,"message":"Unable to complete operation.","details":[]}}"
Running the same query through the rest service explorer results in that parameter being encoded as
orderByFields=["OBJECTID"] <--- WORKS
I can confirm our endpoint table Supports Advanced Queries and I have tested this against the latest api version.
Is there another query parameter that I'm missing?
query.orderByFields = ["[\"OBJECTID\"]"];
After applying the ArcGIS Server 10.1 Quality Improvement Patch we're getting errors on queries using the orderByFields parameter.
query.outSpatialReference = map.spatialReference;
query.returnGeometry = false;
query.outFields = ["*"];
query.where = "1=1";
query.orderByFields = ["OBJECTID"];
The js api encodes this into the request as
orderByFields=OBJECTID <-- FAILS with "{"error":{"code":400,"message":"Unable to complete operation.","details":[]}}"
Running the same query through the rest service explorer results in that parameter being encoded as
orderByFields=["OBJECTID"] <--- WORKS
I can confirm our endpoint table Supports Advanced Queries and I have tested this against the latest api version.
Is there another query parameter that I'm missing?
query.orderByFields = ["[\"OBJECTID\"]"];
Terrible work around but have you triedquery.orderByFields = ["[\"OBJECTID\"]"];