0 Replies Latest reply on Apr 22, 2015 11:15 AM by Welton Lima_496

    CFclient return "undefined"

    Welton Lima_496

      Hello,

       

      I'm new in ColdFusion development and I'm trying return some value from de function on component.

      But independent of the return type, the value is aways "undefined".

       

      This is my function:

      <cffunction name="getAll" returntype="query" access="remote" returnformat="JSON"

        hint="Fetches employee rows from Employee table and returns array of EmployeeTO components">

       

        <cfquery datasource="cg_sindicontaba" name="empRs" result="test">

        select * from tab_001_tes_car

        </cfquery>

       

        <cfreturn empRs>

        </cffunction>

       

      And here I call:

      <cfset empMgr = new cfc_tes_car_mob() />

      <cfset qEmp = empMgr.getAll() />

       

      Thanks.