• JMcCleery
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies

I've recently started using the Salesforce Ruby Toolkit, and have been able to successfully list and update objects. A lot of my custom objects have lookup relationships or Master-Detail relationships. When it has one of these, I'm unable to create a new object because of the extra "_id" that it adds to the sfdc field name. Ex: field is named MyBoss__c, ruby toolkit names it myboss_id__c.  When it tries to insert the object, it says "Required fields are missing: [MyBoss__c]".

 

Has anyone had this same problem? If so, how did you get around it?

 

I'm using Ruby 1.8.7, Rails 2.2.2, asf-soap-adapter 1.3.1, facets 2.8.4

Also installed: rforce 0.7, & rforcedotcom 20.0.0

 

Application Trace:

 C:/Ruby187/lib/ruby/gems/1.8/gems/asf-soap-adapter-1.3.1/lib/active_record/connection_adapters/activesalesforce_adapter.rb:265:in 'send_commands'
C:/Ruby187/lib/ruby/gems/1.8/gems/asf-soap-adapter-1.3.1/lib/active_record/connection_adapters/activesalesforce_adapter.rb:297:in 'commit_db_transaction'
C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:78:in 'transaction_without_nesting_support'
C:/Ruby187/lib/ruby/gems/1.8/gems/asf-soap-adapter-1.3.1/lib/active_record/connection_adapters/activesalesforce_adapter.rb:221:in 'transaction'
C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:129:in 'transaction'
C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:138:in 'transaction'
C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:178:in 'with_transaction_returning_status'
C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:146:in 'save'
C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:158:in 'rollback_active_record_state!'
C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:146:in 'save'
app/controllers/salesforce/buildings_controller.rb:48:in 'create'
app/controllers/salesforce/buildings_controller.rb:47:in 'create'