I have a visualforce page which calls methods tagged with @RemoteAction. The methods are in an extension class which is public, like methods. The class is the extension used in the page. In sandbox everything works as expected.

I try to deploy class, test and page to production but an error turns during the validation for the page: "No remoted actions found to resolve '$RemoteAction.ClassName.methodName'"

I tried to validate another outbound changeset with only the class and the test, which validates successfully. If I add the page, the validation fails.

Have you encountered anything similar?

Thank you very much T.

  • What API version is your page and class on? – greenstork Apr 24 '13 at 15:55
  • Also, does the method have Public visibility, are you using it inside a global component or an iFrame? – greenstork Apr 24 '13 at 15:59
  • It was developed in API 23.0, now I changed to 26.0 and tried to deploy again with no avail. Methods and class are all public (in fact, in sandbox everything works). – T. Rossi Apr 24 '13 at 16:29
  • 1
    Just a guess, but you might try deploying the class first and then the page. Perhaps the compiler isn't correctly checking for the remote actions existence when the remote action is contained in the change set. – Ralph Callaway Apr 24 '13 at 16:44
  • I think so too, there is something wrong with API versions. I created a "global" version (much awful, custom controller that takes id from url and crap like that), which validates just fine. – T. Rossi Apr 24 '13 at 16:47

I suspect the problem has to do with your method visibility being public and something else either in the transaction or the way your are rendering the page (in an iFrame) is causing the issue. From the @remoteAction documentation:

public remote actions may not be used in global components, or otherwise used in a global scope. Scope escalation will result in a compiler error or, for references which are resolved at runtime, a runtime failure.

More information can be found here: http://www.salesforce.com/us/developer/docs/pages/Content/pages_js_remoting.htm

| improve this answer | |
  • The page is working fine in sandbox, but it is impossible to deploy. I suspect the problem is, as suggested earlier, with API versions. For now I've created an all global version of the controller which works in sandbox and can be deployed. – T. Rossi Apr 25 '13 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.