Skip to main content
nikos101
Inspiring
January 19, 2010
Question

Unable to invoke CFC - The DATA parameter to the addMarginOrRefund function is required but was not

  • January 19, 2010
  • 1 reply
  • 1758 views

Im calling a remote object like so to the server

private function addMarginOrRefund(event:MarginCall_or_Refund_Event):void
            {
                myService.addMarginOrRefund(event.data);// cf calls a sp
            }


CF


<cffunction name="addMarginOrRefund" access="remote" returntype="void">
  <cfargument name="data" type="Any" required="yes">

    <cfquery name="q" datasource="#datasource#">   
                       
                       
                        INSERT INTO [tb_MarginCall_or_refund]
           ([clientID]
           ,[dealerID]
           ,[isMarginCall]
           ,[currency]
           ,[amount]
           ,[dateRequested])
     VALUES
           (
<cfqueryparam value="#arguments.data.clientID#" cfsqltype="cf_sql_integer">,
<cfqueryparam value="#arguments.data.clientID#" cfsqltype="cf_sql_integer">,
<cfqueryparam value="#arguments.data.isMarginCall#" cfsqltype="cf_sql_bit">,
<cfqueryparam value="#arguments.data.currency#" cfsqltype="cf_sql_varchar">,
<cfqueryparam value="#arguments.data.amount#" cfsqltype="cf_sql_numeric">,
<cfqueryparam value="#arguments.data.date#" cfsqltype="cf_sql_date">,
              
                       
                        </cfquery>

</cffunction>

but I get an fault on the flex side

faultCode:Server.Processing faultString:'Unable to invoke CFC - The DATA parameter to the addMarginOrRefund function is required but was not passed in.' faultDetail:''

not sure why I should get this, any help would be appreciated

This topic has been closed for replies.

1 reply

Participating Frequently
January 19, 2010

Are you sure the event data you are passing in is event:MarginCall_or_Refund_Event  exists and isn't NULL?

nikos101
nikos101Author
Inspiring
January 19, 2010

everything looks fine in debug

event    customevents.MarginCall_or_Refund_Event (@2b0e8581)   
    [inherited]   
    data    models.MarginCall_or_Refund (@2b0e8511)   
        amount    2   
        clientID    1   
        currency    "GBP"   
        date    Date (@14f85a31)   
        dealerID    0   
        isMarginCall    false  

nikos101
nikos101Author
Inspiring
January 20, 2010

I think the problem is that cf doesn't know how to deal with the

MarginCall_or_Refund

type object, not sure how best to fix this