0

I am getting this error in the inline vf page:

Controller not found for 'CloudFilesController'

while no such error comes when I open the vf page directly without using it as inline page.

VF page:

<apex:page showHeader="false" sidebar="false" standardController="Lead" extensions="CloudFilesController">
  <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/knockout/3.2.0/knockout-min.js"></script>
  <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>


  <script>
       var loadFiles = function() {
            Visualforce.remoting.Manager.invokeAction(
                '{!$RemoteAction.CloudFilesController.getFiles}',
                function(result, event){
                    if (event.status) {
                        console.log(result);
                    } else {
                        console.log('some error occurred');
                    }
                });
        } 
  </script>
</apex:page>

CloudFilesController:

public with sharing class CloudFilesController {

    public CloudFilesController(ApexPages.StandardController controller) {

    }

    @RemoteAction
    public static List<CloudFile__c> getFiles() {
       return null;
    }

}

2 Answers 2

1

I just needed to make my method and class global in the controller. Thanks to this answer Need help understanding why my Javascript remoting doesn't work on a standard Page Layout

0

The SFDC doc say something about this:
enter image description here

1
  • The controller and action exists. It's not just a warning, functionality is also not working
    – vishesh
    Commented Jan 23, 2015 at 7:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .