BUG-13475 Problemas al usar pmconnection.
No se podia insertar o editar nuevos datos en una PMTable usando pmconnection . El problema surgio porque se estaba recuperando de manera erronea el UID de la pmTable, obteniendose siempre vacio. por lo que se corrigio dicho error y ahora se obtiene correctamente el UID para trabajar con la tabla correcta. Hay que tener en cuenta que pmconnection solo funcona con PMTables y no asi con Report Tables.
This commit is contained in:
@@ -165,9 +165,16 @@ try {
|
||||
// saving the data ina pm table in case that is a new record
|
||||
if (! empty( $newValues )) {
|
||||
$id = key( $newValues );
|
||||
if (! $oAdditionalTables->updateDataInTable( $oForm->fields[$oForm->fields[$id]->pmconnection]->pmtable, $newValues )) {
|
||||
$newValues[$id] = $aData['APP_DATA'][$id];
|
||||
$idPmtable = $oForm->fields[$id]->owner->tree->children[0]->attributes['pmtable'];
|
||||
|
||||
while (strlen($id) < 3) {
|
||||
$id = '_' . $id;
|
||||
}
|
||||
|
||||
if (!($oAdditionalTables->updateDataInTable($idPmtable, $newValues ))) {
|
||||
//<--This is to know if it is a new registry on the PM Table
|
||||
$oAdditionalTables->saveDataInTable( $oForm->fields[$oForm->fields[$id]->pmconnection]->pmtable, $newValues );
|
||||
$oAdditionalTables->saveDataInTable($idPmtable, $newValues );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user