
2 answers
Hi Carmilyn,Try using a simple trigger like this.
The above code basically checks compares the date on the record to Jan 1 of this year. If the record has a date thatless than that then it will result in error.Hope this helps!AMtrigger TOTTrigger on TOT (before delete) {
for (TOT deleteMe : trigger.Old) {
if (deleteMe.Date_Vod__c < Date.NewInstance(Date.today().year(), 1, 11)) {
deleteMe.addError('Meaningful Error Message.');
}
}
}