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

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 . Further more on date functions
2. This post has more information on setting up an editable grid structure

Hope the above helps for you to start with