function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kevinp211Kevinp211 

Querying solutions and filtering by solution categories

We are developing an SFDC API solution and have run into a problem when trying to query for solutions and filter by the solution category. We need to return the solutions and filter by the category in a single query call if possible or else use multiple queries very quickly.
 
Here are a couple of ones we tried but received an invalid field or invalid relationship exception.
 
binding.query("Select Id, SolutionName, SolutionNote from Solution where " & _
CategoryData.CategoryNodeId = "searchStringHere" LIMIT 100")
 
binding.query("Select Id, (Select CategoryNodeId From Categorydata where CategoryNodeId = "searchStringHere"), SolutionName, SolutionNote from Solution LIMIT 100")
 
Any help you can provide is appreciated.
Michael.WatkinsMichael.Watkins
this doesn't seem to be possible to do in a straight-forward manner:
http://community.salesforce.com/sforce/board/message?board.id=NET_development&thread.id=5910

i ended up doing a query against categorydata, and another against solutions. then building the relationship between solution and category as i iterate thru the solutions query result set on the back end.

obviously all solutions come back in the solution query and it makes no sense that there isn't a true relationship between solutions and solution categories to filter by in a single call.

good luck!