I create a trigger on User that only insert/update other table when there are changes/insertions into the Department field that belong to User. It's working fine except sometimes I receive this exception in my email:
Apex script unhandled trigger exception by user/organization: 0053000000xxx/00DQ0000003Lxxx Source organization: 00D00000000hxxx (null) MyUpdateTrigger: execution of BeforeUpdate
caused by: line 55, column 24: Dependent class is invalid and needs recompilation: MyHelperClass: line 28, column 30: No such column 'Department' on entity 'User'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.
I check the line number: it points to empty line.
The Department api name has no __c at the end.
I don't receive an email on this error when I do a manual test. I just received an email occassionally, meaning someone is firing the trigger.
Any ideas about the meaning of that error? How to troubleshoot this type of error?