You need to sign in to do that
Don't have an account?
how to get sOjects records from remotesAction
hi i am trying to get sObject records using RemoteAction .In vf page I am unable to retrive field names , in the alert i am getting as undefined. Please any one can help me.
page---
Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.CustomLeadConversion.RecentMappingsRmt}',objApiName,
function(result, event){
if (event.status) {
if(result != null){
alert(result[0].name);
}
}
});
class----
@RemoteAction
global static list<mapping__c> RecentMappingsRmt(string objectname) {
mapping__c[] lstmappings=new mapping__c[]{};
lstmappings=[select name,Source_Field__c,Target_Field__c from mapping__c where name=:objectname];
return lstmappings;
}