0 Replies Latest reply on Sep 9, 2013 3:03 PM by newcf

    auto sugesstion

    newcf Level 1

      Hi there,


      I need to pass the companyId into the cfc but i keep gettting an error, does any know?- thanks


      You cannot specify more arguments to a CFC function than it declares.
      Error parsing bind cfc:cfc.query.getCustName({cfautosuggestvalue},{request.compERP.compID})



      <cfinput type="text" name="cust_name" id="cust_name" size="50" autosuggest="cfc:cfc.query.getCustName({cfautosuggestvalue},compID=request.defaultcompId. compID})" >



      <cffunction name="getCustName" access="remote" returntype="array">
          <cfargument name="search" type="any" required="yes" default="" />

        <cfargument name="CompID" type="numeric" required="yes" />


        <!--- Define variables --->
        <cfset var qCust="">
        <cfset var result=ArrayNew(1)>
        <cfquery name="qCust" datasource="devlivery"  >
         select cust_name from customer
         WHERE lower(cust_name) LIKE lower('#ARGUMENTS.search#%')
                  and compID = #arguments.id#
        <cfloop query="qCust">
        <cfset ArrayAppend(result, cust_name)>
         <!--- And return it --->
          <cfreturn result>