mezza
unread,Nov 8, 2011, 5:59:15 AM11/8/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message as abuse
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ActiveSalesforce
I'm trying to understand why the reload method doesn't work on a
particular object.
In an IRB session, I've instantiated a client connection and a
particular object:
ruby-1.9.2-p136 :010 > a
=> #<Account:0x00000102544590 @Id="001L0000003uA3UIAU",
@IsDeleted=false, @MasterRecordId=nil, @Name="John Doe",
@LastName=nil, @FirstName=nil, @Salutation=nil, @Type=nil,
@RecordTypeId="012D0000000MuIVIA0", @ParentId=nil, @BillingStreet=nil,
@BillingCity=nil, @BillingState=nil, @BillingPostalCode=nil,
@BillingCountry=nil, @ShippingStree...
ruby-1.9.2-p136 :011 > a.class
=> Account
ruby-1.9.2-p136 :012 > a.reload
NoMethodError: undefined method `attributes' for #<Account:
0x000001010feba8>
from ~/.rvm/gems/ruby-1.9.2-p136/gems/databasedotcom-1.2.3/lib/
databasedotcom/sobject/sobject.rb:113:in `reload'
Bizarrely, calling a.Name or a.update_attributes('Name' => 'test')
work fine.
What am I missing?