如何使用Sales-force Rest Api创建自定义字段

时间:2015-10-07 08:13:47

标签: ruby-on-rails rest salesforce salesforce-chatter databasedotcom-gem

我需要在salesforce帐户中使用Salesforce-Bulk-API创建联系人。我的问题是我们是否可以使用批量API在salesforce中为Contact对象创建自定义字段?

    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) 

我尝试将CustomField作为哈希中的属性传递,但它无效。我们是否有任何方法可以在Hash中传递额外的属性,而无需从Salesforce开发人员帐户

中独占添加它们

here

附加了销售人员自定义属性表单的参考图像

0 个答案:

没有答案