0

Similar to this post, my goal is to populate a custom Opportunity field called "Data Source Names" that contains the related product names and list price. I want the field to populate with ALL related products.

So far, I created a formula field on OppProduct that pulls in the Product Name + List Price for each OppProduct: Opportunity Line Item Formula = PricebookEntry.Product2.Name & " " & "-" & " USD " & TEXT(ListPrice).

I then created a process builder on OppProduct for anytime a new product is added to an opportunity, update the Opportunity.Data Source Name with Opportunity Line Item Formula that has the Product Name + List Price. enter image description here enter image description here enter image description here

My issue with the PB is that it only pulls the most recently added product to the custom field. Is there a way to aggregate all related products to the field from OppProducts to the Opportunity object using process builder? If not, how do I use apex trigger to do so?

PS: Linebreaks BR() does now work for formula fields in process builders. This is a known issue so formatting for the field population can be ignored.

2
  • 1
    You can do this with the concatenate rollup feature in the free Declarative Lookup Rollup Summaries package. Also see this Chatter group for support: trailblazers.salesforce.com/_ui/core/chatter/groups/… Commented Jan 4, 2021 at 6:41
  • Thank you! I downloaded the DLRS to a sandbox and testing right now! I also opted for using a flow to accomplish this and learned that it may not be the most dynamic solution given that if a product was to be deleted on the related list, the flow doesn't know how to update that. Commented Jan 7, 2021 at 15:44

0

You must log in to answer this question.

Browse other questions tagged .