function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Developer.mikie.Apex.StudentDeveloper.mikie.Apex.Student 

Trigger or workflow which will update the account name to be that of contacts

Hey guys,

I was just wondering if someone could help me out with something. is it possible to make it so that, using a workflow rule or perhaps a trigger, the Account name is a combination of the contacts within the account. E.G. An account with ben and jane Samol would make the account name = Samol, Ben and Samol, Jane
Best Answer chosen by Developer.mikie.Apex.Student
harsha__charsha__c
It's possible via a trigger.

But what if there are 20 Contacts with each having it's name of 20 chars. The Name size may exceed as Name is just a mormal Text field(255) . 

Regards,
- Harsha

All Answers

harsha__charsha__c
It's possible via a trigger.

But what if there are 20 Contacts with each having it's name of 20 chars. The Name size may exceed as Name is just a mormal Text field(255) . 

Regards,
- Harsha
This was selected as the best answer
Developer.mikie.Apex.StudentDeveloper.mikie.Apex.Student
Hey Harsha,

My org uses accounts in a way that there would be never more than 3 contacts to an account. Would you possibly be able to supply some example code on how I may acheive this?