1

I want to ba able to concatenate the values of a field of a related list records into a field on the parent. How can I do this?

1
4

The only way to do this is with a trigger that does the concatenation when the child record is inserted, updated, or deleted. This is a very costly trigger to write and you should proceed with caution taking into account the number of records you may be dealing with.

As far as I'm aware there is no "point-and-click" solution to this.

2
  • Bradley, Is there an example trigger somewhere that I could manipulate to achieve this task?
    – user20490
    May 14 '15 at 18:11
  • Hey Nicole, I would have to understand your use case. There's a lot of solutions to the issue that would produce very different trigger samples. On another note, if you're asking the question in the first place, chances are there's a data model problem or some other solution to your problem. May 14 '15 at 20:43
3

No, you can't do this with a formula. Formulas can only do cross-object references to parent objects, not to child/related list records. The reason is that formulas only support referencing to a single record, and a related list potentially (usually) contain multiple records.

As @Bradley points out, you would require a trigger.

2
  • does a formula allow SUM of children (related) records?
    – Bartley
    Jan 15 '15 at 22:47
  • No -- formula fields can only reference parent objects. Roll-up summary fields allow a SUM of child records, but are only available for master-detail relationships. (There are some AppExchange apps that allow you to get this functionality on lookup fields as well -- see my response in this post: salesforce.stackexchange.com/a/57086/2730 ) Jan 16 '15 at 17:16
1

Maybe voting for this idea could help:

Ability to concatenate field values from related list

I want to be able to concatenate the values of a field in related list, i.e., child records. For example, If I have an account object and a contact reocrd. there is a one to many relationship between the two (one account, many contacts). The child record has a text field "second choice", I want to be able to show on each account record a field that concatenates all the "second choices" for all the contacts associated to the parent.

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.