function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
One simple solution to it is
List<AggregateResult> ag= [SELECT count(Id) tc, RecordTypeId FROM Static_Data__c group by RecordTypeId];
for(AggregateResult ag:ags)
System.debug(ag.get('RecordTypeId') +' '+ ag.get('tc'));
Replace Static_Data__c by ur object name . Let me know if you face any problems
Thanks and Regards,
Shiva RV
List<AggregateResult> ags = [SELECT count(Id) tc,RecordType.Name recName FROM Static_Data__c group by RecordType.Name ];
for(AggregateResult ag:ags)
System.debug(ag.get('recName') +' '+ ag.get('tc'));
This will give the same answer with recordType name and count result
Thanks and Regards,
Shiva RV
Refer this for more information .
http://www.jonathanbroquist.com/retrieving-sobject-recordtypeid-dynamically-with-salesforce/