Hi,
I have a functionality which automatically triggers an email (a reminder sent on a daily basis) when the work permit of the employee is expired in 30 days.
Now we added a checkbox , when it is checked the email should not be sent any more. I tried to implement this with below steps:
- Created a control procedure : layout
- Below code in the template(the work_permit_expiration date is mandatory):
if @work_permit_check_box = 1 /*when checked*/ begin set @work_permit_expiration = NULL /*null the date*/ end
However, this seems not do perform any changes.
Where am I doing wrong? Or is there any other simple way to execute it.