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
iSfdciSfdc 

Nested SOQL Query- how to fetch fields

Hi,
We have written an S-control to ensure that Cases are not Closed until they have an Open task or event.
In that Process, We are trying to query the details of the Case ID,Task Status and Event  Date/Time, in a Single Nested Query.
The Query is getting executed , but the difficulty is that I am not able to get the Values of Task or Event. However I can access the Case ID.
 
Here is the Nested Query:
 
var result=sforce.connection.query("select id,(select id,ActivityDate,ActivityDateTime from events),(select id,Status from tasks) from case where id='{!Case.Id}' ");
 
Kindly let me know,like how to fetch the Individual values.
 
Gani
 
wahoobiewahoobie

Digging up this old thread as I am currently searching for the syntax to access a value withing the results (in the nexted select).  Any leads?  

 

Thanks for your time!