+ Start a Discussion

Display fields from opportunityLineItemSchedule in OpportunityProduct

I have opportunityLineItemSchedule for opportunity product.
I want to take the unique year from opportunityLineItemSchedule and sum the total revenue for that particular year and display in a table format in a visualforce page.

  User-added image

Its like 1. 1st column contains the unique year
2. Last date of the year
3. sum of revenue for that year

Everything has to come from OpportunityLineItemschedule.

How can i get this?

Please let me know


You can accomplish this by creating a custom controller and playing around with SOQL queries. Below are the directions to accomplish this

1. The following post has more information on date literals that you can use in a SOQL query https://developer.salesforce.com/forums/ForumsMain?id=906F00000008ynAIAQ . Further more on date functions  http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_select_date_functions.htm
2. This post has more information on setting up an editable grid structure https://developer.salesforce.com/forums?id=906F0000000967pIAA

Hope the above helps for you to start with