+ Start a Discussion

global methods do not support return type of List

I have a method shown below 
    @RemoteAction @ReadOnly
    public static list<SelOption> getOwner(String params){
        map<String, String> values = (Map<String, String>) JSON.deserialize(params, map<String, String>.class);
        string searchTerm = String.ValueOf(values.get('q')).trim();
        if (searchTerm.contains('*')) 
            searchTerm =  searchTerm.replace('*','%');
        if (!searchTerm.endsWith('%')) 
            searchTerm = searchTerm + '%';
        list<SelOption> retVal = new list<SelOption>();
        for (User__c avc : [SELECT Name,job_title__c,email__c,Manager_Lookup__r.Name,office_location_2__c,Employee_Number__c
                                from User__c where name like :searchTerm and salesforce_user_account__c !=:UserInfo.getUserId() and job_status__c = 'Active']){
                                    retVal.add(new SelOption(tmn));
        return retVal;

Workaround: I need to change the method to global but it is not allowing to change because global methods do not support return type of List. Any sugesstions that is helpful.
Martha VMartha V
how about serializing it into a JSON string and then deserializing when consuming it?