You need to sign in to do that
Don't have an account?
Deepu2123
global methods do not support return type of List
Hi,
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.
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 V
how about serializing it into a JSON string and then deserializing when consuming it?