1

I am having a requirement to create contacts using Salesforce-Bulk-API in salesforce account. My question is can we also create custom fields for Contact object in salesforce using bulk API?

    salesforce =  SalesforceBulkApi::Api.new(@client)
    records_to_insert = Array.new
    socialcrm_list.socialcrm_list_records.each do |record|
    new_record = {"FirstName" => record.first_name, "LastName" => record.last_name, "Email" => record.email1, "Phone" => record.phone1, "HomePhone" => record.phone3, "MobilePhone" => record.phone2, "MailingStreet" => record.address1, "MailingCity" => record.city,"MailingState" => record.state, "MailingCountry" => record.country, "MailingPostalCode" => record.zip, "CustomField" => record.job}
    records_to_insert.push(new_record) 

I have tried passing CustomField as an attribute in the hash, but it is not working. Is there any way we can pass extra attributes in Hash without adding them exclusively from Salesforce developer Account

Attached a reference image of sales-force custom attribute form over here

Arvind
  • 2,671
  • 1
  • 18
  • 32
Sonam Shah
  • 41
  • 6

0 Answers0