You need to sign in to do that
Don't have an account?
Nida Khan 5
How to make this method of Apex, Aura Enabled to use it in lightning component? Urgent!
Hi All,
I want to use this method in lightining, and thus want to make it aura enabled. How can I do it?
public static List<SelectOption> getAccounts() {
List<SelectOption> accountOptions = new List<SelectOption>();
String rtName = ldObj.RecordType.Name;
accountOptions.add( new SelectOption('NULL','Create New Account :'+ldObj.Company) );
//String query = ' SELECT Id, Name From Account Where recordType.Name =:rtName and name LIKE '+ '\'%'+ldObj.Company+'%\''+ 'limit 1000';
String query = ' SELECT Id, Name From Account Where name LIKE '+ '\'%'+ldObj.Company+'%\''+ 'limit 1000';
for(Account acc : database.query(query) ) {
accountOptions.add( new SelectOption(acc.Id, 'Attach To Existing:'+ acc.Name) );
}
return accountOptions;
}
Please give your suggestions for the same.
I want to use this method in lightining, and thus want to make it aura enabled. How can I do it?
public static List<SelectOption> getAccounts() {
List<SelectOption> accountOptions = new List<SelectOption>();
String rtName = ldObj.RecordType.Name;
accountOptions.add( new SelectOption('NULL','Create New Account :'+ldObj.Company) );
//String query = ' SELECT Id, Name From Account Where recordType.Name =:rtName and name LIKE '+ '\'%'+ldObj.Company+'%\''+ 'limit 1000';
String query = ' SELECT Id, Name From Account Where name LIKE '+ '\'%'+ldObj.Company+'%\''+ 'limit 1000';
for(Account acc : database.query(query) ) {
accountOptions.add( new SelectOption(acc.Id, 'Attach To Existing:'+ acc.Name) );
}
return accountOptions;
}
Please give your suggestions for the same.
http://salesforce.stackexchange.com/questions/53596/auraenabled-support-for-apex-class-return-types