+ Start a Discussion
Anjali Sharma 87Anjali Sharma 87 

wrapper class with opportunity and task

hiii
i want to create a vf page on which i have two object one opportunity and task.
i have created the vf and controller bt i m facing the problem that how to a fetch the value of opportunity and on those opportunity we have task i a single query.
i m not abe to create a relationship query .Can anyone please help me 
Prem_PalPrem_Pal
I am not sure if you can query Opportunity and its tasks in a single query. What is the problem in using 2 queries?

Thanks,
Prem
Puru AnnamalaiPuru Annamalai
Hi Siddhartha,

Pls try this query, it will query the each opportunity and its tasks.
SELECT Id,(SELECT Id FROM Tasks) FROM Opportunity

if it solves your question, pls mark it asbest answer   
Anjali Sharma 87Anjali Sharma 87
Hi,
Prem yes actually the problem is with task we cannot query  it with task because it does not support bt i create a code for that and its working perfect.In a code i have create two map and one wrapper list ....
But thanx for reply 

Siddhartha