function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
raseshtcsraseshtcs 

List Not getting populated with all the fields queried

Hi,

 

I am trying to populate a list of custom object. I am querying 4-5 fields and then adding the results to a list. On doing a system.debug of the list,the list does not contain all the fields which i did put in the query. All this is happening in a trigger. When I am doing the same thing directly in the system log, it works just fine. I have checked for the field level securities of the fields i am querying.

 

Please let me know where I am going wrong...

 

Thanks in advance.

raseshtcsraseshtcs
hiListTotal = [Select Id, Completed_Reviews__c,In_Progress_Reviews__c, CLM_Name__c, No_of_Reviews__c from HMT_Intermediate__c where CLM_Name__c IN : ownerIds];
        system.debug('hiListTotal'+hiListTotal);
        for(HMT_Intermediate__c hi : hiListTotal){
            system.debug('compReviews:'+Double.Valueof(hi.Completed_Reviews__c));
            hiTotal.put(hi.CLM_Name__c,hi);
            system.debug('hiTotal'+hiTotal);
        }
        system.debug('hiTotal'+hiTotal);

 Here is the code for the same.. The system.debug does not contain all the fields. Here is the system log for the same.

13:06:56.668 (668264000)|SOQL_EXECUTE_BEGIN|[95]|Aggregations:0|select Id, Completed_Reviews__c, In_Progress_Reviews__c, CLM_Name__c, No_of_Reviews__c from HMT_Intermediate__c where CLM_Name__c IN :tmpVar1
13:06:56.678 (678453000)|SOQL_EXECUTE_END|[95]|Rows:1
13:06:56.678 (678470000)|HEAP_ALLOCATE|[95]|Bytes:8
13:06:56.678 (678480000)|HEAP_ALLOCATE|[95]|Bytes:65
13:06:56.678 (678520000)|HEAP_ALLOCATE|[95]|Bytes:69
13:06:56.678 (678560000)|VARIABLE_ASSIGNMENT|[95]|hiListTotal|[{"CLM_Name__c":"00570000001Rp86AAC","Id":"a33V000000003EVIAY"}]|0x3d0a263d
13:06:56.678 (678567000)|STATEMENT_EXECUTE|[96]
13:06:56.678 (678576000)|HEAP_ALLOCATE|[96]|Bytes:11
13:06:56.678 (678594000)|SYSTEM_METHOD_ENTRY|[96]|String.valueOf(Object)
13:06:56.678 (678668000)|HEAP_ALLOCATE|[96]|Bytes:77
13:06:56.678 (678678000)|SYSTEM_METHOD_EXIT|[96]|String.valueOf(Object)
13:06:56.678 (678690000)|HEAP_ALLOCATE|[96]|Bytes:88
13:06:56.678 (678697000)|SYSTEM_METHOD_ENTRY|[96]|System.debug(ANY)
13:06:56.678 (678703000)|USER_DEBUG|[96]|DEBUG|hiListTotal(HMT_Intermediate__c:{CLM_Name__c=00570000001Rp86AAC, Id=a33V000000003EVIAY})
13:06:56.678 (678709000)|SYSTEM_METHOD_EXIT|[96]|System.debug(ANY)
13:06:56.678 (678724000)|SYSTEM_METHOD_ENTRY|[97]|LIST.iterator()
13:06:56.679 (679001000)|SYSTEM_METHOD_EXIT|[97]|LIST.iterator()
13:06:56.679 (679177000)|SYSTEM_METHOD_ENTRY|[97]|system.ListIterator.hasNext()
13:06:56.679 (679190000)|HEAP_ALLOCATE|[97]|Bytes:5
13:06:56.679 (679196000)|SYSTEM_METHOD_EXIT|[97]|system.ListIterator.hasNext()
13:06:56.679 (679207000)|SYSTEM_METHOD_ENTRY|[97]|system.ListIterator.next()
13:06:56.679 (679227000)|SYSTEM_METHOD_EXIT|[97]|system.ListIterator.next()
13:06:56.679 (679241000)|VARIABLE_SCOPE_BEGIN|[97]|hi|HMT_Intermediate__c|true|false
13:06:56.679 (679256000)|VARIABLE_ASSIGNMENT|[97]|hi|{"CLM_Name__c":"00570000001Rp86AAC","Id":"a33V000000003EVIAY"}|0x58b4f37c
13:06:56.679 (679262000)|STATEMENT_EXECUTE|[97]
13:06:56.679 (679264000)|STATEMENT_EXECUTE|[98]
13:06:56.679 (679271000)|HEAP_ALLOCATE|[98]|Bytes:12
13:06:56.679 (679299000)|SYSTEM_METHOD_ENTRY|[98]|Double.valueOf(Object)
13:06:56.679 (679333000)|SYSTEM_METHOD_EXIT|[98]|Double.valueOf(Object)
13:06:56.679 (679342000)|SYSTEM_METHOD_ENTRY|[98]|String.valueOf(Object)
13:06:56.679 (679351000)|SYSTEM_METHOD_EXIT|[98]|String.valueOf(Object)
13:06:56.679 (679360000)|HEAP_ALLOCATE|[98]|Bytes:16
13:06:56.679 (679367000)|SYSTEM_METHOD_ENTRY|[98]|System.debug(ANY)
13:06:56.679 (679372000)|USER_DEBUG|[98]|DEBUG|compReviews:null
13:06:56.679 (679377000)|SYSTEM_METHOD_EXIT|[98]|System.debug(ANY)
13:06:56.679 (679380000)|STATEMENT_EXECUTE|[99]
13:06:56.679 (679431000)|SYSTEM_METHOD_ENTRY|[99]|MAP.put(ANY, ANY)
13:06:56.679 (679461000)|HEAP_ALLOCATE|[99]|Bytes:-4
13:06:56.679 (679469000)|SYSTEM_METHOD_EXIT|[99]|MAP.put(ANY, ANY)
13:06:56.679 (679475000)|STATEMENT_EXECUTE|[100]
13:06:56.679 (679482000)|HEAP_ALLOCATE|[100]|Bytes:7
13:06:56.679 (679492000)|SYSTEM_METHOD_ENTRY|[100]|String.valueOf(Object)
13:06:56.679 (679547000)|HEAP_ALLOCATE|[100]|Bytes:96
13:06:56.679 (679556000)|SYSTEM_METHOD_EXIT|[100]|String.valueOf(Object)
13:06:56.679 (679565000)|HEAP_ALLOCATE|[100]|Bytes:103
13:06:56.679 (679572000)|SYSTEM_METHOD_ENTRY|[100]|System.debug(ANY)
13:06:56.679 (679577000)|USER_DEBUG|[100]|DEBUG|hiTotal{00570000001Rp86AAC=HMT_Intermediate__c:{CLM_Name__c=00570000001Rp86AAC, Id=a33V000000003EVIAY}