
Originally Posted by
jmertic
The second file needs a .php extension, but otherwise doing a Quick Repair and Rebuild afterwards should solve it.
Ups, a finger error, already that have it, searching for another solution, i made a custom view.edit.php within
[sugarcrm]\custom\modules\Meetings\views\
with this code:
PHP Code:
$cuentas = array();
$db = DBManagerFactory::getInstance();
$query = "SELECT id, name FROM accounts WHERE deleted = 0";
$result = $db->query($query, true, 'Error');
while($row = $db->fetchByAssoc($result)){
$cuentas[$row['id']]=$row['name'];
}
$this->ss->assign('myOptions', $cuentas);
$query = 'SELECT cuentas_c FROM meetings_cstm WHERE id_c="'.$this->bean->id.'"';
$result = $db->query($query, true, 'Error');
$cuentas = $db->fetchByAssoc($result);
$cuentasSeleccionadas = $cuentas['cuentas_c'];
$cuentasSeleccionadas = explode("^",$cuentasSeleccionadas);
$this->ss->assign('mySelect',$cuentasSeleccionadas);
$handle = fopen("pruebaCuentas.txt","a+");
fwrite($handle, $cuentasSeleccionadas[0]."\n");
and then put customCode within the field definition:
PHP Code:
'customCode' =>'<select multiple = "multiple" id="cuentas_c[]" name="cuentas_c[]">
<option value="null">-- none --</option>
{html_options options=$myOptions selected=$mySelect}
</select>',
that works!:

But within the detail view a don't know how to made it:

What of this posible solutions are easier? thanks for the help
Bookmarks