You need to sign in to do that
Don't have an account?
Michael.Watkins
searching solutions by category
any ideas how one would mimic the portal search solution functionality by solution category?
oSearchResult = oProxy.search("find {" & searchString & "} in Solution fields returning Solution (Id, CreatedDate, LastModifiedDate, SolutionName)")
the only thing i can think of is to search solutions as referenced above, and then loop thru the categorydata by RelatedSobjectId after-the-fact with additional calls. the downside is this would burn several api calls and seems a backwards approach to what i need-
which is something like:
SELECT ID, SolutionName, LastModifiedDate, cn.MasterLabel FROM Solution s
INNER JOIN CategoryData c ON c.RelatedSobjectId=s.ID
INNER JOIN CategoryNode cn ON cn.ParentId=c.CategoryNodeId
WHERE cn.MasterLabel='[Desired_CategoryName_Filter]'
thanks-
oSearchResult = oProxy.search("find {" & searchString & "} in Solution fields returning Solution (Id, CreatedDate, LastModifiedDate, SolutionName)")
the only thing i can think of is to search solutions as referenced above, and then loop thru the categorydata by RelatedSobjectId after-the-fact with additional calls. the downside is this would burn several api calls and seems a backwards approach to what i need-
which is something like:
SELECT ID, SolutionName, LastModifiedDate, cn.MasterLabel FROM Solution s
INNER JOIN CategoryData c ON c.RelatedSobjectId=s.ID
INNER JOIN CategoryNode cn ON cn.ParentId=c.CategoryNodeId
WHERE cn.MasterLabel='[Desired_CategoryName_Filter]'
thanks-
There's not much of a better way than pretty much what you've described -- do the SOSL search first, then filter to only the solutions in that match a given category using CategoryData.
If you want to avoid burning too many queries you could do this as an Apex webService method instead. That would probably run significantly faster and it would cut it down to just 1 overall API hit per search.