0

Using the solution on SF StackExchange here I have created a Workflow Rule and Field Update to show the value of a custom field present on the OppProduct Level in Opportunity Level (as that field needs to searchable in global searches)

The problem is that if there are 2 or more products only the most recent value of the custom field in the latest product is shown on the Opportunity level - Not both!

Is there a way to show all of them on the Opportunity field (maybe separated with a ;)

1 Answer 1

0

You can't do this with a workflow rule because a field update doesn't give you access to the existing value.

You could do this with a process, though. Create a new process that runs when a record is created/updated.

Choose Opp Product as the base object.

Set your criteria for when the opp product should trigger an update.

In that actions, choose to update a record and select the 'Opportunity Id'. That allows you to update the parent opportunity.

Choose the field you want to modify and set the type to 'Formula'. Then you use a formula to concatenate the existing value with the new value.

The formula would look like this if you wanted to add the line item description from the opp product to the description field on the opportunity:

[OpportunityLineItem].Opportunity.Description + " " + [OpportunityLineItem].Description 

The process runs once per opp product that meets your criteria, so every opp product that's added or edited to meet your conditions will add to your result field on the opportunity.

Make sure your criteria only allows this to run once per opp product or you'll get duplicate values every time the product is edited.

7
  • Great I have tried your solution but failed on the 'concatenate' bit (it dies work otherwise like in my method above - only the latest field value appearing) --- I am finding it hard to understand what to concatenate as I am thinking that would only work if I knew the exact number of instances to concatenate... can you show me an example? thanks!
    – TheAdmin
    Commented Mar 1, 2017 at 12:04
  • Edited the solution with an example and some clarifying remarks addressing your questions. Commented Mar 1, 2017 at 12:49
  • Thanks - one last question - for the last part (criteria only running once) do I need to create a checkbox and add it to the criteria (e.g. only run if checked) I have selected the "Do you want to execute the actions only when specified changes are made to the record?" but that won't let any fields populate at all...
    – TheAdmin
    Commented Mar 1, 2017 at 13:07
  • Depends on your use case. You could set it to only add the value to the opportunity when the opportunity product is created. Or you could have it update the opportunity only when the relevant field changes. Again - it just depends on what conditions you need to trigger the update. Commented Mar 1, 2017 at 13:15
  • I need the field contents from OppProducts to populate to my field on the Opps level (BUT THEY MUST NOT BE ADDED IF THE SAME VALUE EXISTS ALREADY - NO DUPLICATES) I have used the formula evaluates to true in my criteria - using your 'description' example is this correct? (AND(NOT(ISNULL([OpportunityLineItem].Description))) || ISCHANGED([OpportunityLineItem].Description )) *Will only run if the description is populated *Will only add the value to the description if it is changed (new/ different value)
    – TheAdmin
    Commented Mar 1, 2017 at 15:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .