public function processEditByFieldAction()
 {
     $personId = (int) $this->_getParam('personId');
     $type = $this->_getParam('type');
     $id = (int) $this->_getParam('id');
     $field = $this->_getParam('field');
     $value = $this->_getParam('value');
     $obj = null;
     switch ($type) {
         case 'address':
             $obj = new Address();
             $obj->person_id = $personId;
             if (!$id > 0) {
                 $obj->active = 1;
             }
             break;
         case 'phone':
             $obj = new PhoneNumber();
             $obj->person_id = $personId;
             if (!$id > 0) {
                 $obj->active = 1;
             }
             break;
         default:
             break;
     }
     $retVal = false;
     if ($obj !== null && in_array($field, $obj->ormFields())) {
         if ($id > 0) {
             foreach ($obj->_primaryKeys as $k) {
                 $obj->{$k} = $id;
             }
             $obj->populate();
         }
         $obj->{$field} = $value;
         $obj->persist();
         $retVal = true;
     }
     if ($retVal) {
         $data = true;
     } else {
         $data = array('error' => __('There was an error attempting to update the selected record.'));
     }
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct($data);
 }