You need to sign in to do that
Don't have an account?
Bryn Jones
SOQL & Query on VF Question
I have a SOQL query from rollup helper and want to use it in a VF page.
the query is SELECT Opportunity__c , ExpectedRevenue FROM Opportunity WHERE isDeleted = false AND closedate = THIS_MONTH
this sums up the amount of the closed opps and i wnat to use it to show on a VF page.
Please help
Bryn
the query is SELECT Opportunity__c , ExpectedRevenue FROM Opportunity WHERE isDeleted = false AND closedate = THIS_MONTH
this sums up the amount of the closed opps and i wnat to use it to show on a VF page.
Please help
Bryn
You want to display the sum ExpectedRevenue of all the opportunity in vf page.
if this is the case than you need to do the following.
public integer totalRevenue=0;
list<Opportunity>oppList=[SELECT Opportunity__c , ExpectedRevenue FROM Opportunity WHERE isDeleted = false AND closedate = THIS_MONTH];
for(Opportunity opp:oppList){
totalRevenue+=opp.ExpectedRevenue;
}
You can use this field in Visual force page.
Thanks
Shailu