2014-05-20 23 views

回答

3

這是一個多步驟的過程:

  1. 獲取列對象:

    # get the describe for the Account object 
    account_columns = client.describe('Account') 
    # => { ... } 
    
  2. 運行正常查詢:

    accounts = client.query("select #{account_columns} from Account where Id = 'someid'") 
    # => #<Restforce::Collection> 
    
    account = accounts.first 
    # => #<Restforce::SObject> 
    
  3. 訪問相關對象:

    account.Owner 
    

來源 - https://github.com/ejholmes/restforce

相關問題