[英]NoMethodError when creating a Salesforce custom object record from a RoR app with databasedotcom-rails gem
[英]Rails(ROR) and Salesforce
我需要从我的ROR应用程序中更新salesforce(CRUD操作)。 我尝试了databasedotcom。 它与client_ID和client_secret一起使用时效果很好。 我的情况是,我不会获得client_ID
和client_secret
但会从用户那里获得用户salesforce凭证(用户名/密码+安全令牌)。 如何在没有 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)
解
Salesforce批量宝石是解决方案。 它使用用户名和密码凭据与Salesforce进行交互。 点击以下链接
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.