2

I have a php script that accesses some salesforce objects via soql, and I'm rewriting it to ruby. To understand my problem, assume that I have 2 salesforce custom objects that are associated with a parent-to-child relation.

Using the Force.com Toolkit for PHP I can run a query like this:

SELECT Model__c.Name, Model__c.Widget__r.Name from Model__c

And I can see the Model_c.Name attribute, as well as the child's object attribute Model_c.Widget__r.Name.

My problem is that I'm not seeing a way to do the same operation with the databasedotcom gem in Ruby. For example, with the gem I can do this:

client = Databasedotcom::Client.new("config/databasedotcom.yml")
client.authenticate :username => 'me@mycompany.com',:password => 'mypasswordplusmysecuritytoken'
client.materialize("Model__c")
f = Model__c.find(any_key)

And it will bring in the f variable all the values of the attributes of Model_c (including in this example: Model_c.Name) but I can't see a way to get the child object attributes (in this example: Widget__r.Name).

I read the entire gem documentation and I don't see the way to do this. Any help will be appreciated.

Hernan Velasquez
  • 2,770
  • 14
  • 21
  • Hi @Hernan, there is a new stackexchange site specific to Salesforce at salesforce.stackexchange.com. Come join the community over there! :) As a reference there are about 4x the questions on the new stackexchange as compared to SO and a lot more active participants. – Ralph Callaway Nov 29 '13 at 22:11

0 Answers0