+ Start a Discussion
aravindaaaaaravindaaaa 

No remoted actions found to resolve

Hi,

 

I have a remoteAction annotated method in one of my apex classes and I'm trying to call that action from a visualforce.

My call looks like 

 

Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.DetailsController.addCompany}',id, name, function(response, event)

 where 'id' and 'name' are additional params to the action. The above snippet always throws "No remoted actions found to resolve" error. Any idea where I'm going wrong? Thanks. 

Anup JadhavAnup Jadhav

Just to confirm, did you put the @RemoteAction annotation near the addCompany() method in the controller? If you did, and you still get this error message, can you post atleast partially the "addCompany" method here for us to investigate?

 

Thanks,

Anup

aravindaaaaaravindaaaa

Yes Anup. I did add the @RemoteAction annotation. Please find the code below

 

@RemoteAction
    global static string addCompany(string id, string name ){
        //Apex callout to an external webservice
    return "name";
    }

 

Tom G.ax970Tom G.ax970

Did you resolve this problem?

 

The class your remote action is typically is also the named controller for the page.  Which is disappointing because I wonder then what the purpose is of making it a global class if I have to pass-around references to it.

 

So in our environment at least, our pages must begin with...

 

<apex:page ... controller="MyRemoteController">

 

so that later on we can invoke global static methods inside the class MyRemoteController marked @RemoteAction insdie Javascript.

MFSDevMFSDev

I have 

Visualforce.remoting.Manager.invokeAction(
'{!$RemoteAction.RemoteActionController.insertPFLead}',

and at Apex

global class RemoteActionController {
global RemoteActionController(){}
@RemoteAction
global static String  insertPFLead(string firstnameString,string lastnameString,string emailString,string companyString)
{

return "Hello";
}

}


Why this is coming?

Harpreet On CloudHarpreet On Cloud

Make sure that the "RemoteActionController" class is mentioned as controller or extensions of the apex:page tag. Otherwise it will give this error.

 

fgwarb_1fgwarb_1

Tom G wrote:

[...] 

The class your remote action is typically is also the named controller for the page.  Which is disappointing because I wonder then what the purpose is of making it a global class if I have to pass-around references to it.

 [...]


Completely agree

Murali Krishna 56Murali Krishna 56
Just put your java script code above the form tag or any render component section. Your are rendering the section which contains the script you have writen.

It will solve the issue.