Here is what I have so far:
Any assistance is very much appreciated!!Thanks,Emilytrigger MultipleSpeakerTrigger on Speaker__c (before delete,before insert, before update) {
Set<ID> parentids = new set<ID>();
for(Speaker__c child : Trigger.new){
parentids.add(child.Multiple_Speakers__c);
}
List<Speaker__c> mainspeaker = new List <Speaker__c>();
mainspeaker = [Select ID, Name, Main_Speaker__r.Speaker_Full_Name__c
from Speaker__c where main_speaker__c = null and id in :parentids];
List<Speaker__c> childspeaker = new List <Speaker__c>();
childspeaker = [Select ID, Name, Main_Speaker__r.Speaker_Full_Name__c,Main_Speaker__c
from Speaker__c where main_speaker__c != null and id in :parentids];
for(Speaker__c p :mainspeaker){
for(Speaker__c c :childspeaker){
if(!p.Multiple_Speakers__c.containsIgnoreCase(c.Main_Speaker__c)){
p.Multiple_Speakers__c += c.Main_Speaker__c + ';';
}
}}
update mainspeaker;
}
It's a blank text area that appears in the primary speaker record type. I'm trying to get it so that all the secondary speakers will show up in that text box. For example, if Bob Smith has a record type of Primary Speaker, and he has Jane Doe and Phillip Jones speaking with him during his presentation (both record type of Secondary Speaker with Smith tied in the Main_Speaker__c (look up to primary speakers), then Multiple_Speakers__c on Bob Smith's record should show as Jane Doe; Phillip Jones; If we remove the tie or delete Jane's record, then the Multiple_Speakers__c should just show as Phillip Jones;I'm not sure if that makes sense as I'm pretty sure the code doesn't since I messed around with it so much trying to get it to work... Thanks for your response and please let me know if there is anything else I can provide.