I'm working in a managed package and I want to use the less references to the namespace (CI proposes ).
For now I would like to know if it's possible to get records from my controller in my javascript code without the namespace in a remote action. for example:
Method in controller:
@RemoteAction
public String getAccountInformation(){
return JSON.serialize([Select Id,Name,my_custom_field from Account]);
}
function in my javascript file:
function loadAccounts(){
my_namespace.MyController.getAccountInformation(function(result,event){
if(event.status){
var array = JSON.parse(result.replace(/("\;)/g,"\""));
//Here My loop over the array
//here my array returns namespace__my_custom_field **************
}
});
}
I would like something that returns the value without to create and assign the values to a wrapper class in the controller.