[英]Rails(ROR) and Salesforce
I need to update salesforce (CRUD operation) from my ROR application. 我需要从我的ROR应用程序中更新salesforce(CRUD操作)。 I tried with databasedotcom.
我尝试了databasedotcom。 It works good with client_ID and client_secret.
它与client_ID和client_secret一起使用时效果很好。 My case is, I will not get
client_ID
and client_secret
but I will get users salesforce credential(username/password+securitytoken) from user. 我的情况是,我不会获得
client_ID
和client_secret
但会从用户那里获得用户salesforce凭证(用户名/密码+安全令牌)。 how to proceed without client_ID
and client_secret
. 如何在没有
client_ID
和client_secret
情况下继续操作。 Let me know if any other gem will work out for my scenario. 让我知道是否有其他适合我的情况的宝石 。
Source code 源代码
@@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)
SOLUTION 解
Salesforce-bulk gem is the solution. Salesforce批量宝石是解决方案。 It uses username and password credential to interact with salesforce.
它使用用户名和密码凭据与Salesforce进行交互。 Follow the below link
点击以下链接
https://github.com/jorgevaldivia/salesforce_bulk http://wiki.developerforce.com/page/Accessing_Salesforce_Data_From_Ruby (Section: Use the Bulk API ) https://github.com/jorgevaldivia/salesforce_bulk http://wiki.developerforce.com/page/Accessing_Salesforce_Data_From_Ruby (部分:使用批量API)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.