I'm going round in circles trying to figure out how to approach this one -
- I have a Contract with an end date
- The Contract has a child object (Contract Work)
- Contract Work has tasks
I want to write a trigger that generates an alert when a Task is inserted with a date later than the end date of the Contract.
I have to figure out if the Task parent is a Contract Work record and if it is, compare the Contract Work's parent Contract End Date with the ActivityDate of the Task.
I've been trying to do it with sets and maps but I'm not there yet.
Any help in how to tackle this would be greatly appreciated.
Many Thanks, Mike.