• Joel Farber
  • NEWBIE
  • 0 Points
  • Member since 2018

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

I've been an admin with my Org for the last year and I'm uncovering some things that consultants have done in my Org prior to my arrival. I don't know much about development, so I'm hoping you might be able to help. I appreciate any help!

1. The consultant who created this trigger is no longer providing services, but still receives error notifications. His user is inactive, so I don't know how he's still receiving these. 

2. He created a trigger on Tasks that he called "TaskEventListener." I'm not sure what this does or if it's even necessary. He received an error email alert from this trigger. Error shown below in italics.

Subject: Developer script exception from IPC Inc. : TaskEventListener : TaskEventListener: execution of AfterUpdate caused by: System.DmlException: Update failed. First exception on row 0 with id 006d000000WwBA0AAN; first error: FIELD_CUSTOM_VALIDATION_EXCEPTI...

Apex script unhandled trigger exception by user/organization: 005d0000003NkdD/00Dd0000000eKKE

TaskEventListener: execution of AfterUpdate

caused by: System.DmlException: Update failed. First exception on row 0 with id 006d000000WwBA0AAN; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, The Opportunity field "Follow Up Date" cannot be overdue. Please update to Today or another day in the future. Note: If you receive this error while editing a Task, you must first go to the related Opportunity and update this required information.: []


Here's the code to the Trigger:
1trigger TaskEventListener on Task (After Insert, After Update) {
2  if(trigger.IsAfter){
3    TaskUtility.PopulateOpportunityNextStep(trigger.new);
4    TaskUtility.PopulateAccountNextStep(trigger.new);
5  }
6}