You need to sign in to do that
Don't have an account?
ckellie
AggregateResult Returning an Error
I am trying to group owner names for a dynamic picklist and I have hit a brick wall that I am not sure how to solve.
Here is the error
Non-void method might not return a value or might have statement after a return statement.
And the code
public List<CampaignMember> getactiveOwners(){ for(AggregateResult agr : [ Select OwnerName__r.Full_Name__c From CampaignMember where OwnerName__c != null group by OwnerName__r.Full_Name__c]){ aOwner = string.valueof(agr.get('ownerName__r.Full_Name__c')); } }
How do I solve the error?
Thank you
try something like this:
All Answers
This is a syntax error rather than a problem with your query.
Your method signature indicates you will return a list of campaign members, but you don't have a return statement.
I am struggling with this type of method,
would I write:
try something like this:
Thank you Quinton,
Your code has helped me write my first Aggregate Result.
thank you,
ckellie