Skip to main content
added 15 characters in body
Source Link
Vamsi Krishna Gosu
  • 10.5k
  • 5
  • 33
  • 50

This is my SOQL

SELECT ID,NAME,(SELECT ID,JUNCTION_TEXT__C FROM SPENDACCOUNT__C.CASE_SPEND_ACCOUNTS__R) FROM SPENDACCOUNT__C

SELECT ID,NAME,
 (SELECT ID,JUNCTION_TEXT__C FROM SPENDACCOUNT__C.CASE_SPEND_ACCOUNTS__R) 
FROM SPENDACCOUNT__C

SpendAccount__c is the Master.

Case_Spend_Account__c is the Child.

When I execute the following SOQL in Query Editor I am able to view the results (like shown below)

enter image description here

I was curious as to how I will be able to view the aggregated result (JUNCTION_TEXT__C coming from the child) and when I did the following anon apex I could not view the aggregated part at all.

My anon apex shown below.

enter image description here

Debug log output

enter image description here

What am I missing ?..can someone help ?

This is my SOQL

SELECT ID,NAME,(SELECT ID,JUNCTION_TEXT__C FROM SPENDACCOUNT__C.CASE_SPEND_ACCOUNTS__R) FROM SPENDACCOUNT__C

SpendAccount__c is the Master.

Case_Spend_Account__c is the Child.

When I execute the following SOQL in Query Editor I am able to view the results (like shown below)

enter image description here

I was curious as to how I will be able to view the aggregated result (JUNCTION_TEXT__C coming from the child) and when I did the following anon apex I could not view the aggregated part at all.

My anon apex shown below.

enter image description here

Debug log output

enter image description here

What am I missing ?..can someone help ?

This is my SOQL

SELECT ID,NAME,
 (SELECT ID,JUNCTION_TEXT__C FROM SPENDACCOUNT__C.CASE_SPEND_ACCOUNTS__R) 
FROM SPENDACCOUNT__C

SpendAccount__c is the Master.

Case_Spend_Account__c is the Child.

When I execute the following SOQL in Query Editor I am able to view the results (like shown below)

enter image description here

I was curious as to how I will be able to view the aggregated result (JUNCTION_TEXT__C coming from the child) and when I did the following anon apex I could not view the aggregated part at all.

My anon apex shown below.

enter image description here

Debug log output

enter image description here

What am I missing ?..can someone help ?

Source Link

SOQL Query : Parent to Child Query result

This is my SOQL

SELECT ID,NAME,(SELECT ID,JUNCTION_TEXT__C FROM SPENDACCOUNT__C.CASE_SPEND_ACCOUNTS__R) FROM SPENDACCOUNT__C

SpendAccount__c is the Master.

Case_Spend_Account__c is the Child.

When I execute the following SOQL in Query Editor I am able to view the results (like shown below)

enter image description here

I was curious as to how I will be able to view the aggregated result (JUNCTION_TEXT__C coming from the child) and when I did the following anon apex I could not view the aggregated part at all.

My anon apex shown below.

enter image description here

Debug log output

enter image description here

What am I missing ?..can someone help ?