Coldfusion CFINVOKE parameter not working?

273 views Asked by At

I want to invoke a cfc file on my webserver, but I always get the error: The required parameter [UserID] was not provided.

Coldfusion code:

<CFINVOKE component="changeTree" method="getTreeWidth" returnVariable="httpTreeWidth">
<cfinvokeargument name="UserID" value="#checklogin.UserID#">
</CFINVOKE>

changeTree.cfc:

<CFFUNCTION name="getTreeWidth">
<CFPARAM name="UserID" required="true">
...

Thanks for help.

1

There are 1 answers

0
Chester On BEST ANSWER

In changeTree.cfc, it's suppposed to be <cfargument name="UserID" required="true"> not <cfparam>.