Hi,
I don't get any error in PHP.
This is the fields function of the Recordset.php file:
function fields() {
$fields = array();
$ID = new RBO_Field_Autonumber('ControlHorasID');
//$ID -> Set_visible();
$fields[] = $ID;
$Empresa = new RBO_Field_Text('Empresa');
$Empresa->set_length(30)->set_required()->set_visible();
$fields[] = $Empresa;
$Fecha = new RBO_Field_Date('Fecha');
$Fecha->set_visible();
$fields[] = $Fecha;
$Inicio = new RBO_Field_Timestamp('Inicio');
$Inicio->set_visible();
$fields[] = $Inicio;
$Fin = new RBO_Field_Timestamp('Fin');
$Fin->set_visible();
$fields[] = $Fin;
/*$Tiempo = new RBO_Field_Calculated('Tiempo');
//$Tiempo->set_visible();
$fields[] = $Tiempo;
$Proyecto = new RBO_Field_Select('Proyecto');
//$Proyecto->from('Proyectos_Usuario')->fields('Proyectos')->set_visible(); ==> Cal crear recordset per linkar projectes amb usuari.
$fields[] = $Proyecto;*/
$Fase = new RBO_Field_Select('Fase-Categoria');
$Fase->from('FaseCategoria')->fields('Fase-Categoria')->set_required()->set_visible();
$fields[] = $Fase;
$TipoTarea = new RBO_Field_Select('Tipo-Tarea');
$TipoTarea->from('TipoTarea')->fields('Tipo-Tarea')->set_required()->set_visible();
$fields[] = $TipoTarea;
$Observaciones = new RBO_Field_LongText('Observaciones');
$Observaciones->set_visible();
$fields[] = $Observaciones;
return $fields;
}
and the body function:
public function body() { // - modules main code
print('Control Horas');
// Here we call Record Browser
//$me = CRM_ContactsCommon::get_my_record();
$rs = new Custom_ControlHoras_Recordset();
$this->rb = $rs->create_rb_module($this, 'Custom_ControlHoras');
$this->display_module($this->rb);
}
This is before saving the record
And this after saving the record