You need to sign in to do that
Don't have an account?
@CA
How to add multiple contacts to WhoId field of an event?
We have enabled shared activity feature so that we can add multiple contact to name field of an event.. It works from the UI..
But when we try to update WhoID field form the class it replaces the existing contact.. need some help in adding multiple events to the contact thru apex.
sample Method:
public void updateEvents(){
for(Event Evt:[Select Id, WhoId from Event where Id =:selectedRecID]){
Evt.WhoId=Id;
updateEventList.add(Evt);
}
if(!updateEventList.isEmpty()){
update updateEventList;
}
}
Any help on this will be apprecited.
But when we try to update WhoID field form the class it replaces the existing contact.. need some help in adding multiple events to the contact thru apex.
sample Method:
public void updateEvents(){
for(Event Evt:[Select Id, WhoId from Event where Id =:selectedRecID]){
Evt.WhoId=Id;
updateEventList.add(Evt);
}
if(!updateEventList.isEmpty()){
update updateEventList;
}
}
Any help on this will be apprecited.