• jojo5
  • NEWBIE
  • 20 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
Is there a way to rename the "Attendees" field in the Events Page? If so, can someone point me to the right direction? I have a feeling it can't be done since this is part of EventRelation and it's a hidden object.
  • May 19, 2020
  • Like
  • 0
Hi, can someone please show me examples of how to compare old and new values using the EventRelation Object? Is this even possible? I just want to get the old values of the isParent and isInvitee.
Below is what I was trying out, but it gives me an error.

Method does not exist or incorrect signature: void get(Boolean) from the type Map<Id,SObject>

for (EventRelation er: eLst) {
        EventRelation oldOpp = Trigger.oldMap.get(er.EventId);
}
 
  • May 13, 2020
  • Like
  • 0
I entered a contact in the Name and Attendees field and now I want to be able to make sure that if I deleted a Contact from the name field it gets removed from the Invitees field and vise versa. To make this happen, I did an IF statement to check if the value of isParent == false OR isInvitee == false. This works for the isParent == false, but it doesn't seem to catch it if the isInvitee == false. Can anyone help me on why 'OR' is not working and have any suggestions on how to make this work? Thanks.

if (trigger.isUpdate){ List<EventRelation> erLst = [SELECT EventId, RelationId, isParent, isInvitee FROM EventRelation where EventId IN :sEvents ]; for(EventRelation sObj: erLst ){ if (sObj.IsParent == false || sObj.IsInvitee == false ){ delete sObj; } else{ sObj.IsParent = true; sObj.IsInvitee = true; UpdatedLst.add(sObj); update UpdatedLst; } } }
  • May 09, 2020
  • Like
  • 0
Is there a way to rename the "Attendees" field in the Events Page? If so, can someone point me to the right direction? I have a feeling it can't be done since this is part of EventRelation and it's a hidden object.
  • May 19, 2020
  • Like
  • 0
Hi, can someone please show me examples of how to compare old and new values using the EventRelation Object? Is this even possible? I just want to get the old values of the isParent and isInvitee.
Below is what I was trying out, but it gives me an error.

Method does not exist or incorrect signature: void get(Boolean) from the type Map<Id,SObject>

for (EventRelation er: eLst) {
        EventRelation oldOpp = Trigger.oldMap.get(er.EventId);
}
 
  • May 13, 2020
  • Like
  • 0
I entered a contact in the Name and Attendees field and now I want to be able to make sure that if I deleted a Contact from the name field it gets removed from the Invitees field and vise versa. To make this happen, I did an IF statement to check if the value of isParent == false OR isInvitee == false. This works for the isParent == false, but it doesn't seem to catch it if the isInvitee == false. Can anyone help me on why 'OR' is not working and have any suggestions on how to make this work? Thanks.

if (trigger.isUpdate){ List<EventRelation> erLst = [SELECT EventId, RelationId, isParent, isInvitee FROM EventRelation where EventId IN :sEvents ]; for(EventRelation sObj: erLst ){ if (sObj.IsParent == false || sObj.IsInvitee == false ){ delete sObj; } else{ sObj.IsParent = true; sObj.IsInvitee = true; UpdatedLst.add(sObj); update UpdatedLst; } } }
  • May 09, 2020
  • Like
  • 0