def salesforce_sync
      return if self.salesforce_skip_sync?
      if salesforce_perform_async_call?
        Delayed::Job.enqueue(SalesforceArSync::SalesforceObjectSync.new(self.class.salesforce_web_class_name, salesforce_id, salesforce_attributes_to_update), :priority => 50)
      else
        if salesforce_object_exists?
          salesforce_update_object(salesforce_attributes_to_update) if salesforce_attributes_to_update.present?
        else
          salesforce_create_object(salesforce_attributes_to_update(!new_record?)) if salesforce_id.nil?
        end
      end
    rescue Exception => ex
      self.errors[:base] << ex.message
      return false
    end
def salesforce_sync
      return if self.salesforce_skip_sync?
      if salesforce_perform_async_call?
        Delayed::Job.enqueue(SalesforceArSync::SalesforceObjectSync.new(self.class.salesforce_web_class_name, salesforce_id, salesforce_attributes_to_update), :priority => 50)
      else
        if salesforce_object_exists?
          salesforce_update_object(salesforce_attributes_to_update) if salesforce_attributes_to_update.present?
        else
          salesforce_create_object(salesforce_attributes_to_update(!new_record?)) if salesforce_id.nil?
        end
      end
    rescue Exception => ex
      self.errors[:base] << ex.message
      return false
    end
sync model data to Salesforce, adding any Salesforce validation errors to the models errors