I need a field on my contacts that will have the name of all of the opportunities concatenated. Rollups do not seem to work, because they only do numbers. Formula fields do not work.
There might be a better solution, but I used Process Builder to create a visual workflow to run whenever an Opportunity is created.
The Steps in the flow go thusly:
- Lookup Opportunity to get ContactID. (might be able to pass this in through process builder)
- Fast lookup to create collection of the relevant opportunities.
- Loop through collection. I use LoopVariable1
- Assignment action - add LoopVariable1.Name to another variable (varAllOppNames)
- After loop, record update contact with that variable.
For bonus to make it look nicer, I added a decision element inside of the loop so that it would point to two different assignment actions. The one mentioned above, and another that would include a ", " before the second opportunity name. I created another variable called varIteration and the assignments add 1 to it. The decision checks if varIteration =0 and will point it accordingly.