You need to use Salesforce:SfBase.query_by_sql('your soql string') (bad method name I know!)
Few things to note when using this method. Unlike using the standard Active-Record type Salesforce::StandardObject.find(..) methods, you need to use the Force.com object and field names including the __c if it is a custom object/field.
If you want a more complex example demonstrating subquerues, check out chatter_feed.rb in the asf-soap-adapter gem.
Your problem is in how you are handling the response. I suspect you are iterating through a collection, and missing the 'records' keyword Try something like:
myOuterObject.myInnerCollection.records do .....
A good way to check is to output your collection with the puts command and you will be able to see the structure of the response better.
You need to use Salesforce:SfBase.query_by_sql('your soql string') (bad method name I know!)
Few things to note when using this method. Unlike using the standard Active-Record type Salesforce::StandardObject.find(..) methods, you need to use the Force.com object and field names including the __c if it is a custom object/field.
If you want a more complex example demonstrating subquerues, check out chatter_feed.rb in the asf-soap-adapter gem.
I already tried with Salesforce::SfBase.query_by_sql, but it throws below error.
If I am missing to implement result method in my controller, then please let me know how?
Or let me know just what to do to get rid of this error.
Your problem is in how you are handling the response. I suspect you are iterating through a collection, and missing the 'records' keyword Try something like:
myOuterObject.myInnerCollection.records do .....
A good way to check is to output your collection with the puts command and you will be able to see the structure of the response better.
HTH