I want to display in a field at the Account level the name of the Stage of the last created Opportunity that has an specific product.
e.g. An Account has 3 Opportunities. And I'm looking for the Stage of the Opportunity that has "Pencils" as Products and was recently created.
- Opportunity 1 is at Stage 4 , has pencils and was created Today. (I want to get the Stage4 name for this one, as this was the latest created. and has pencils)
- Opportunity 2 is at Stage 2 , has pencils and was created Yesterday.
- Opportunity 3 is at Stage 1, does not have pencils and was created Today.
I already have setup the logic for pulling the info from the Product to a field on the Opportunity, let's call it "Has Pencils".
This has to be done as a field and not just as a view, given that this field will sync with other systems outside of SF.
Thanks for your help!