Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

cfinvoke argument missing??

New Here ,
Jul 16, 2012 Jul 16, 2012

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.

625
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

New Here , Jul 16, 2012 Jul 16, 2012

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.

Translate
New Here ,
Jul 16, 2012 Jul 16, 2012
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources