Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top