Problems with the methods create and update of rforce 0.10 gem

Johan Rincon's Avatar

Johan Rincon

02 Oct, 2012 10:50 PM

Hi all,

I am using rfoce 0.10 to get all the registers of the objects of a salesforce's instance, this is working fine. However, I need now update an object using rforce, I tested invoking update method but it not worked for me.  I was reviewing the documentation and found the following example to create an object:

=== Creating a record

opportunity = [
:type, 'Opportunity', :accountId, account_id, :amount, '10.00', :name, 'Fakey McFakerson', :closeDate, '2008-07-04', :stageName, 'Closed Won' ]

binding.create :sObject => opportunity

My code is: require "rforce" binding = ("" )
id= binding.login("xxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
objectChangec = [
:Id,'a0XU0000002X1iPMAS', :Name,'Testing', :type,'ObjectChange
c' ] puts binding.create :sObject=>objectChange__c

The Output is : {:Fault=>{:faultcode=>"soapenv:Client", :faultstring=>"Missing entity type information. sObject requires a separate 'type' field be sent."}}

Then I sent of the next form:
puts binding.create [:sObject=>objectChangec, :type=>'ObjectChangec'] and the output is:

But really the object isn't create. When I invoke the method update the output is equal the previous case explained.

Can you help me with this?


  1. Support Staff 1 Posted by Eric Hodel on 03 Oct, 2012 12:01 AM

    Eric Hodel's Avatar

    This site is for help with ruby gems itself. Please consult the author of rfoce directly for help.

  2. Eric Hodel closed this discussion on 03 Oct, 2012 12:01 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac