Hello everyone,I'm facing a challenge now, and I just want to obtain your best advice because this is a really interesting project...I have a custom related list called "Opportunity Products" in to my standard object Opportunity, this related list contain every item used in this opportunity, including price, quantity and also the amount... the challenge begin when I'm looking automate the process, to updated a field called "Product Description" using the "Product Description" from my "Opportunity Products" related list, and using just the 3 largest amount records, shown in this related list... so the first step is, to identify the 3 largest amount, to then update this field...I could identify the first large amount using a RollUp field (easy), but I'm trying to identify, the 2 seconds largest amount, and I found this really tricky.. so any light will be really welcomed... Thanks in advance...
I would suggest you to write your logic before insert and before Update trigger on Opportunity Product to update Opportunity. Using trigger, you would be able to populate Product Description as well as Amount 1 & Amount2 field.