我使用rforce寶石創造我的銷售人員數據庫中的記錄。的Ruby/Rails:我怎樣才能在Salesforce中創建多個記錄經由rforce寶石一個API調用?
爲rforce文檔中創建記錄的例子是:
opportunity = [
:type, 'Opportunity',
:accountId, account_id,
:amount, '10.00',
:name, 'Fakey McFakerson',
:closeDate, '2008-07-04',
:stageName, 'Closed Won'
]
binding.create :sObject => opportunity
Salesforce的API調用create()
允許同時創建多個對象,但我在努力做到這一點。我已經嘗試下面的調用:
binding.create :sObject => array_of_opportunities
array_of_opportunities
哪裏是象在上面的例子opportunity
數組的數組。
而是拋出一個錯誤:
NoMethodError (undefined method `to_sym' for #<Array:0x00000004ba5488>)
我會很感激的任何幫助。
沒有ü登錄使用OAuth?如果那麼什麼是OAuth的ACCESS_TOKEN和access_secret是嗎? – 2012-02-21 08:55:49