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

How to handle Subscript is invalid because list is empty Visualforce Error??

I have a query 

[Select id,name,(SELECT task.ActivityDate,task.Description,task.Subject FROM test__c.tasks) from test__c]; 

i am able to display test__c and task fields but if test__c do not have any task then visualforce is displaying 

Content cannot be displayed: Subscript is invalid because list is to handle this?


Are you sure it's visualforce complaining and not a custom controller?

yes.if i remove the task associated fields,then i didnot get error.