Skip to main content
added 49 characters in body
Source Link

I have this Apex SOQL query:- Map<Id,AggregateResult> results=new Map<id,AggregateResult>([select accountid id,min(id),min(Partner_Admin_Sequence_Number__c) Integer from Contact where AccountId IN:deactconacctSet and Contact_Status__c ='Active' and (Partner_Admin_Sequence_Number__c !=null and Partner_Admin_Sequence_Number__c!=0) group by accountid]);

Map<Id, AggregateResult> results = new Map<Id, AggregateResult>([
    select accountid id, min(id), min(Partner_Admin_Sequence_Number__c) Integer 
    from Contact
    where AccountId IN:deactconacctSet and Contact_Status__c ='Active' and (Partner_Admin_Sequence_Number__c !=null and Partner_Admin_Sequence_Number__c!=0)  group by accountid
    ]);

I have this Apex SOQL query:- Map<Id,AggregateResult> results=new Map<id,AggregateResult>([select accountid id,min(id),min(Partner_Admin_Sequence_Number__c) Integer from Contact where AccountId IN:deactconacctSet and Contact_Status__c ='Active' and (Partner_Admin_Sequence_Number__c !=null and Partner_Admin_Sequence_Number__c!=0) group by accountid]);

I have this Apex SOQL query:

Map<Id, AggregateResult> results = new Map<Id, AggregateResult>([
    select accountid id, min(id), min(Partner_Admin_Sequence_Number__c) Integer 
    from Contact
    where AccountId IN:deactconacctSet and Contact_Status__c ='Active' and (Partner_Admin_Sequence_Number__c !=null and Partner_Admin_Sequence_Number__c!=0)  group by accountid
    ]);
Source Link

AggregateResult throws error: System.ListException: Row with null Id at index: 0

I have this Apex SOQL query:- Map<Id,AggregateResult> results=new Map<id,AggregateResult>([select accountid id,min(id),min(Partner_Admin_Sequence_Number__c) Integer from Contact where AccountId IN:deactconacctSet and Contact_Status__c ='Active' and (Partner_Admin_Sequence_Number__c !=null and Partner_Admin_Sequence_Number__c!=0) group by accountid]);