Copy link to clipboard
Copied
Hello,
I'm having problem with method invocation. I have the following at the top of my function:
<cfobject component="cfc.main" name="mainCFCObj">
And later on in the code I do invocations as follows:
<cfinvoke component="#mainCFCObj#" method="GetEntriesBySection" returnvariable="sectionData" tableSection="C.1">
I do the above several times (for different methods and arguments) and it works fine until one invocation:
<cfinvoke component="#mainCFCObj#" method="GetAjaxRecordCountForUser" returnvariable="myAjaxRecordCount" username="some_user">
Coldfusion 10 gives me the following error:
The USERNAME parameter to the GetAjaxRecordCountForUser function is required but was not passed in.
Does anyone have any idea about this?? Thank you.
Solved.
Looking through the documentation for cfinvoke I realized that username is one of the optional attributes of the cfinvoke tag. So changing username variable name to something else did the trick.
Also, <cfinvokeargument name="username" value="some_user"> inside the <cfinvoke></cfinvoke> works as well, since here username is an argument to a method and not an attribute of the tag like before.
Thank you everybody.
Copy link to clipboard
Copied
Solved.
Looking through the documentation for cfinvoke I realized that username is one of the optional attributes of the cfinvoke tag. So changing username variable name to something else did the trick.
Also, <cfinvokeargument name="username" value="some_user"> inside the <cfinvoke></cfinvoke> works as well, since here username is an argument to a method and not an attribute of the tag like before.
Thank you everybody.