kausi21
11-29-2007, 05:22 PM
I'm getting this error when I click the submit button in my Flex Application.
"The NEWCLIENT parameter to the NewCustomer function is required but was not passed in."
I have spent couple hours trying to figure out whats going on, but can't seem to find it. Any help would be wonderful
-code below-
CFC CODE
<cffunction name="NewCustomer" access="remote" returntype="any">
<cfargument name="NewClient" type="struct" required="yes">
<cfset var Customer="">
<cfquery name="Customer" datasource="server">
INSERT INTO
glb_customers
(firstname,lastname,address,city,state_id,zip,coun try_id,phone,phone2,email)
VALUES ('#NewClient.firstname#','#NewClient.lastname#','# NewClient.address#','#NewClient.city#', #NewClient.state_id#,'#NewClient.zip#',#NewClient. country_id#,'#NewClient.phone#','#NewClient.phone2 #','#NewClient.email#')
SELECT IDENT_CURRENT('glb_customers') AS customer_id
</cfquery>
<cfreturn Customer>
</cffunction>
I'm using a remote object, and I saw some example code using a webservice it looked like this "wsWebinarInterview.CreateNewClient.send(NewClient) ;"
Now do remote objects use the .send command also, or is that only with webservices? Mine looks like this "dataManager.NewCustomer(NewClient);"
"The NEWCLIENT parameter to the NewCustomer function is required but was not passed in."
I have spent couple hours trying to figure out whats going on, but can't seem to find it. Any help would be wonderful
-code below-
CFC CODE
<cffunction name="NewCustomer" access="remote" returntype="any">
<cfargument name="NewClient" type="struct" required="yes">
<cfset var Customer="">
<cfquery name="Customer" datasource="server">
INSERT INTO
glb_customers
(firstname,lastname,address,city,state_id,zip,coun try_id,phone,phone2,email)
VALUES ('#NewClient.firstname#','#NewClient.lastname#','# NewClient.address#','#NewClient.city#', #NewClient.state_id#,'#NewClient.zip#',#NewClient. country_id#,'#NewClient.phone#','#NewClient.phone2 #','#NewClient.email#')
SELECT IDENT_CURRENT('glb_customers') AS customer_id
</cfquery>
<cfreturn Customer>
</cffunction>
I'm using a remote object, and I saw some example code using a webservice it looked like this "wsWebinarInterview.CreateNewClient.send(NewClient) ;"
Now do remote objects use the .send command also, or is that only with webservices? Mine looks like this "dataManager.NewCustomer(NewClient);"