This is returned as the last row, the group record ID looks cut off

Group_Member__c:{Id=a181K000005jd11QAA, Contact__c=0031K00002tTqaQQAS, Group__c=a171K00000

Query is

            list<group_member__c> gmm = ([SELECT id, contact__r.mobilePhoneString__c, group__c from group_member__c where (is_sms_group__c = true and status__c = 'Active')]);

Maybe the ID is correct and the discrepancy is at system.debug?

Edit - just realized the query isn't returning all of the records I need. Double-checked data by creating an equivalent report. Very weird


1 Answer 1


Two things are going on here. First of all, you debug the list itself, so you get type coercion. If you want to view all elements in list with 10+, you should first serialize it.

Second, a while back Salesforce made a change in Sprint 19:

To help prevent connection pool timeouts caused by exceptionally large queries, strings are now truncated at 512 characters in the Developer Console’s Log Inspector. This truncation applies to all string values in the Execution Log panel and to SOQL queries in the Source panel. You can view the complete string in a raw log file.

You have to View Raw Log.

  • Super helpful thanks!
    – bill
    Jul 24, 2020 at 13:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.