Hello everyone,
In the opportunity table, we have a sub-grid that will show the Opportunity Line item records.
For each product, we have different prices and below the grid, there is the Opportunity Product Amount calculation that will do the sum of all the products.
I have added a field on the opportunity form called "Filtered Total Amount" as follow:
What I want to achieve is the below:
I want to filter the grid based on the product name, and upon filtering the data the "filtered total amount" field should be the sum of the filtered products.
For example: When I filter by Product Name which is "D365 Online Professional", the filtered total amount should automatically do the sum of the filtered data and show the calculated result.
I need to do this kind of calculation because in the OOB functionality I didn't find any way to calculate the sum of the product based on a filtered grid view.
How can we calculate the total amount and set the value on the field based on any filter applied for a product to calculate the sum from within the sub-grid?
Is it possible to achieve the above scenario? Please provide some helpful resources to build this solution and I would highly appreciate it if you can provide an example or a sample code.
Any help is highly appreciated.
Best regards,
EBMRay