• eellis
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

I'm working on a visualforce page that requires some javascript remoting.  I've run into a funny issue that I'm hoping someone will have run into before and help me out.  This page has been developed and working for a long time but has just recently started to give us problems.  It now throws a javascript error: line 122 on VFRemote.js: "Uncaught TypeError: Cannot read property ‘RemoteClassController’ of undefined".  Here is the current code: 

In javascript:
function save(){
Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.RemoteClassController.remoteMethod}',param1,param2,param3,handleUpdatesCheck);
} function handleUpdatesCheck(result, event) { ... }

Controller:
global with sharing class RemoteClassController {
@RemoteAction
global static List<String> remoteMethod(String param1, String param2, String param3){
...
}
}

 

This javascript remoting call works (nothing else changes):

RemoteClassController.remoteMethod(param1,param2,param3,handleUpdatesCheck);

 

I'd really like to get this figured out and use the original code.  We are using managed packages and the original code works nicely with being packaged.  We're using API version 26 right now.  Does anyone know why this error is being thrown??

 

Thanks!

I'm working on a visualforce page that requires some javascript remoting.  I've run into a funny issue that I'm hoping someone will have run into before and help me out.  This page has been developed and working for a long time but has just recently started to give us problems.  It now throws a javascript error: line 122 on VFRemote.js: "Uncaught TypeError: Cannot read property ‘RemoteClassController’ of undefined".  Here is the current code: 

In javascript&colon;
function save(){
Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.RemoteClassController.remoteMethod}',param1,param2,param3,handleUpdatesCheck);
} function handleUpdatesCheck(result, event) { ... }

Controller:
global with sharing class RemoteClassController {
@RemoteAction
global static List<String> remoteMethod(String param1, String param2, String param3){
...
}
}

 

This javascript remoting call works (nothing else changes):

RemoteClassController.remoteMethod(param1,param2,param3,handleUpdatesCheck);

 

I'd really like to get this figured out and use the original code.  We are using managed packages and the original code works nicely with being packaged.  We're using API version 26 right now.  Does anyone know why this error is being thrown??

 

Thanks!