Written by

J2 interactive
Question Laura Cavanaugh · Jul 29, 2016

Ever get Error #5001:Attempt to call non-ZENMethod?

I'm getting the above error.  My zen page calls other javascript methods  and other server methods just fine.  But when I call my  method, I get the error.  Yes, I've tried making it look exactly like the methods that work.  But for some reason, it doesn't seem to know that DoLogout is a zen method. 

Anyone ever get this error?

THanks

L

for example

ClientMethod logout() [ Language = javascript ]  {   zenPage.DoLogout();  }

Method DoLogout() [ZenMethod]   {   //blah blah  }

Comments

Eduard Lebedyuk · Jul 29, 2016

If they are defined in one class, try:

ClientMethod logout() [ Language = javascript ]  {   this.DoLogout();  } 
0
Laura Cavanaugh  Jul 29, 2016 to Eduard Lebedyuk

I have tried every combination I can think of:

//zenThis.DoDebug(); //zenThis is null
//zenPage.DoDebug(); //Attempt to call non-ZENMethod
//this.DoDebug(); //attempt to call non-ZENMethod
//%this.DoDebug(); //available only in ObjectScript
//do ..DoDebug(); //same
(I'm actually calling a DoDebug zenmethod)

It's possible that i have to compile all the child classes; I just don't want to do that yet until no one else is on the system. I can call some other zenmethod that already exists, and it can find it. Just can't find my new zenmethod, although the javascript method is available.

Thanks -L

0
Laura Cavanaugh · Jul 29, 2016

I did indeed have to re-compile all 180 dependent classes.  The zenmethod is now available the parent page.  Good to know.

0