Topic by David Soto
Content
Hi,
I am trying to make a simple SELECT on a Custom Object (Package: CO. Object: Correlativo), but there seems to be a syntax problem, basically my code looks like:
$clasificacion = $incident->CustomFields->c->tipo_clasificacion->LookupName ;
$canal = $incident->CustomFields->c->tipo_canal->LookupName ;
$agencia = $incident->CreatedByAccount->StaffGroup->LookupName;
$query1 = "SELECT CorrelativoActual FROM CO.Correlativo C WHERE C.Clasificacion.LookupName = '"+$clasificacion+"' AND C.Canal.LookupName = '"+$canal+"' AND C.Agencia.LookupName = '"+$agencia+"'";
$correlativoActual = RNCPHP\ROQL::query($query1)->next();
echo $correlativoActual;
Clasificacion, Canal & Agencia are Menu-Only Custom Objects (and I have added them to CO.Correlativo).
The error shows me that $query1 equals "0". When I try to show only the $query1, it shows me "0" indeed.
Any help is appreciated.
Thanks
David