function submit_custom_object($candidate) { $customObj_from_form = $candidate->loadCustomObject(); $this->log_debug("looking up custom object"); $custom_data = $this->getClient()->find_custom_object($candidate); $customObject_bh = new \Stratum\Model\CustomObject(); $customObject_bh->setLogger($this->_logger); $customObject_bh->populateFromData($custom_data); $id = $customObject_bh->get("id"); $customObject_bh->set("dateAdded", ""); //dateAdded is automatically put there by Bullhorn if ($id) { $customObj_from_form->set("id", $id); } if ($customObject_bh->compare($customObj_from_form)) { $this->log_debug("Custom objects are equal: no update required"); } else { $this->log_debug("Custom object needs update"); $this->getClient()->submit_custom_object($customObj_from_form, $candidate); } }