0

I'm try to build a formula using the Formula Builder to capture the Product Family Name of every Opportunity Product and populate that in a custom text field at the Opportunity level.

For example, if there are three Opportunity Products (having Product Family Names as P1, P2 and P3) for an Opportunity, then I would like to add these names as "P1, P2, P3" in the custom text field of Opportunity. But when I'm trying to do this, it is replacing the existing value with new value (if P1 is stored in that text field and I'm adding a new product, then it is replacing P1 with P2)

Could anyone please help me out with this? I would really appreciate it!

4
  • 1
    This would be a great use case for Declarative Lookup Rollup Summaries in Concatenate mode.
    – David Reed
    Jun 28 '18 at 19:08
  • @AdrianLarson, I tried building that using the formula builder and I could refer the Custom Text field to have the Product Family Name of Product 1 but when I add the second product, it is replacing the existing value with a new one. Opportunity.Custom_Text_field ==OpportunityLineItem.Product_Family_Name this is the formula I'm using currently.
    – Vishnu
    Jun 28 '18 at 19:19
  • If these names will never ever ever change you could Append by concatenating using an IF ( AND( NOT(ISBLANK(...)), INCLUDES(.....))... formula and conditionally append the specific values that you want.
    – Ronnie
    Jun 29 '18 at 0:52
  • DLRS is the right answer
    – cropredy
    Jul 1 '18 at 23:31
0

The best approach here is to write a Trigger. Or use Declarative Lookup Rollup Summaries to do this task for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.