• devnulll
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

I am trying to create a trigger that will add the phone, email and maybe one more contact field to the Event.Description field before insert.

 

The reason is that the email notification for new event is very vague and not helpful - missing the phone adn email. As a benefit the contact's phone and email will also be visible on cell phones and Outlook

 

So I created a trigger and it works, but I can't seem to retrieve the phone and email from the Event. These fields do not seem to exist, but are seemed linked to the contact's phone and email.

 

Here is my trigger:

trigger UpdateTaskDescription on Event (before insert) {
   for(Event e: trigger.new){
      if(e.description == null){e.description = '';}
      e.description += '\nPhone:'+ e.phone;
    }
}

 It generates an error on the last line - that e.phone doesn't exist.

 

Any ideas how to retrieve the corresponding phone and email fields from the related contact to which this event is linked?




I am trying to create a trigger that will add the phone, email and maybe one more contact field to the Event.Description field before insert.

 

The reason is that the email notification for new event is very vague and not helpful - missing the phone adn email. As a benefit the contact's phone and email will also be visible on cell phones and Outlook

 

So I created a trigger and it works, but I can't seem to retrieve the phone and email from the Event. These fields do not seem to exist, but are seemed linked to the contact's phone and email.

 

Here is my trigger:

trigger UpdateTaskDescription on Event (before insert) {
   for(Event e: trigger.new){
      if(e.description == null){e.description = '';}
      e.description += '\nPhone:'+ e.phone;
    }
}

 It generates an error on the last line - that e.phone doesn't exist.

 

Any ideas how to retrieve the corresponding phone and email fields from the related contact to which this event is linked?