Does @RemoteAction
have to be in a separate controller than your other methods?
Example; using something like below, returns a nullpointerexception in remote action.
public with sharing class clsGetViewData {
public String something { get; set; }
public clsGetViewData(){
something = [Query].field;
}
public List<sObject> getSomeOtherData() {
return [Query];
}
@RemoteAction
public static List<sObject> MyRemoteAction() {
return [Query];
}
}
But in the above code, removing all methods, getter/setter, etc and only leaving remote action works...
Note: I have used an extension but since it's a different question, I'll ask about it seperately.