我需要从我的ROR应用程序更新salesforce(CRUD操作)。我试过databasedotcom。它适用于client_ID和client_secret。我的情况是,我不会得到client_ID
和client_secret
但我将从用户那里获得用户salesforce凭证(用户名/密码+ securitytoken)。如何 没有 client_ID
和client_secret
。如果 任何其他宝石 将适用于我的方案,请告诉我。
源代码
@@client = Databasedotcom::Client.new("config/databasedotcom.yml")
@@client.authenticate :username => username, :password => password+securitytoken
@@client.sobject_module =SFDC_Models
@@client.materialize('User')
@user =SFDC_Models::User.all
@@client.create("Account",account_attr)
答案 0 :(得分:0)
<强>解强>
Salesforce-bulk gem是解决方案。它使用用户名和密码凭证与salesforce进行交互。请点击以下链接
https://github.com/jorgevaldivia/salesforce_bulk http://wiki.developerforce.com/page/Accessing_Salesforce_Data_From_Ruby(部分:使用批量API)