Skip to main content
2 risposte
  1. 6 ago 2019, 07:10
    Hi Midhuna,

    This is because the standard SelectOption class doesn't have the @AuraEnabled annotation, you'll need to create your own SelectOption class.

     

    public 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; }

    }

    for more information follow bellow link it may helpful for you

    https://salesforce.stackexchange.com/questions/53596/auraenabled-support-for-apex-class-return-types

    I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

    Thanks,

    Ajay Dubedi
0/9000