class SfContact < ActiveRecord::Base
establish_connection :salesforce
include ActiveSalesforce::ActiveRecord::Mixin
set_table_name "contact"
end
# script/console
jim = SfContact.new
jim.save
# actual result: ActiveSalesforce::ASFError: statusCodeREQUIRED_FIELD_MISSINGfieldsLastNamemessageRequired fields are
missing: [LastName]
# expected result: same (better use of whitespace would be nice, though)
jim.save
# actual result: ActiveRecord::StatementInvalid: NoMethodError: You have a nil object when you didn't expect it! You
might have expected an instance of Array. The error occurred while evaluating nil.[]: UPDATE contact SET other_postal_code
= NULL, name = NULL, mailing_state = NULL, last_cu_update_date = NULL, department = NULL, master_record_id = NULL,
mailing_street = NULL, title = NULL, salutation = NULL, other_state = NULL, mailing_postal_code = NULL, birthdate =
NULL, account_id = NULL, last_activity_date = NULL, last_modified_by_id = NULL, created_date = NULL, created_by_id =
NULL, assistant_name = NULL, system_modstamp = NULL, mailing_country = NULL, last_cu_request_date = NULL, description
= NULL, assistant_phone = NULL, phone = NULL, owner_id = NULL, other_street = NULL, other_country = NULL, home_phone
= NULL, fax = NULL, other_city = NULL, lead_source = NULL, languages__c = NULL, is_deleted = NULL, first_name = NULL,
reports_to_id = NULL, other_phone = NULL, mailing_city = NULL, level__c = NULL, last_name = NULL, last_modified_date
= NULL, mobile_phone = NULL, email = NULL WHERE id = ''
# expected result: ActiveSalesforce::ASFError with explanation of validation failure
|