Lightning Components & AuraEnabled method parameters: What’s working and what’s not
Fabien Taillon
12214

Hi i have this error in my apex
:

AuraEnabled methods do not support return type of List<System.SelectOption>.


My class is:


public List<SelectOption> getListOfUser()
 {
 List<remode_branch__c> Users = [SELECT branch__c FROM remode_branch__c] ;
 List<SelectOption> UserOptionList = new List<SelectOption>();
 UserOptionList .add(new SelectOption( ‘ ‘ ,’ — -Select — -’));
 for(remode_branch__c u : Users )
 {
 UserOptionList .add(new SelectOption(u.branch__c,u.branch__c));
 }
 return UserOptionList ;
 }


I want to make this Auraenabled.please help