I wrote a trigger to throw validation error on ILR object record. This is a custom object. The purpose of this trigger is : when any ilr record is cloned from the parent using custom cloning functionality it checks that no child record should have same month entered as parent. And child record is named as : 'Copy of '+.
I want my adderror string to come up in the VF page with red colour..but nothing is coming up..and I am able to save child record with same month as parent. While checking in debug log there I found my code is reaching the adderror message block.
Could you pls suggest if there is anything wrong with this code below.
and suggest the syntax of to display teh error mesg from triiger in VF page?