You need to sign in to do that
Don't have an account?
sgss
Write a SOQL query to retrieve sum of all closed Opportunity amount for current fiscal year. Store this information in a map with key as year and value as sum of amount. Iterate this map to display statistics
Can anyone help me with this?
Write a SOQL query to retrieve sum of all closed Opportunity amount for current fiscal year. Store this information in a map with key as year and value as sum of amount. Iterate this map to display statistics.
Write a SOQL query to retrieve sum of all closed Opportunity amount for current fiscal year. Store this information in a map with key as year and value as sum of amount. Iterate this map to display statistics.
1.how manycasescases closed from last one year
List<AggregateResult> aggr = [select CALENDAR_YEAR(CloseDate) Year,SUM(Amount) Amount from Opportunity
where CloseDate = THIS_FISCAL_YEAR group by CALENDAR_YEAR(CloseDate)];
map<Integer,Decimal> Sumofamount = new map <Integer,Decimal>();
System.debug(aggr);
}