1

I have a custom object Feedback. I want to create a list of editable feedback records using Javascript Remoting. Following is my controller..

global with sharing class AccountRemoter {
public String accountName { get; set; }
public List <Feedback__c> account { get; set; }
public AccountRemoter() { }
@RemoteAction
global static Feedback__c getAccount(String accountName) {
List<Feedback__c> account = [SELECT Id, Name FROM Feedback__c ];
return account ;
 }
}

I'm getting the following error

"Error: Compile Error: Return value must be of type: SOBJECT:Feedback__c at line 8 column 8".

Please guide. Thanks

1 Answer 1

4

Change declaration of method.

You put Feedback__c as returned value in declaration but you returning List<Feedback__c>

1
  • THnx for the heads up!
    – MnZ
    Oct 22, 2014 at 20:34

You must log in to answer this question.

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