2 件の回答
Hi Midhuna,This is because the standard SelectOption class doesn't have the @AuraEnabled annotation, you'll need to create your own SelectOption class.
for more information follow bellow link it may helpful for youhttps://salesforce.stackexchange.com/questions/53596/auraenabled-support-for-apex-class-return-typesI hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.Thanks,Ajay Dubedipublic class SelectOption {
public SelectOption(String value, String label) {
this.value = value;
this.label = label;
this.disabled = false;
this.escapeItem = false;
}
public SelectOption(String value, String label, Boolean isDisabled) {
this.value = value;
this.label = label;
this.disabled = isDisabled;
this.escapeItem = false;
}
@AuraEnabled
public String label { get;set; }
@AuraEnabled
public String value { get;set; }
@AuraEnabled
public Boolean disabled { get;set; }
@AuraEnabled
public Boolean escapeItem { get;set; }
}