Error with Change based Alerts - Batch job - AX 2012 R2

I am having this error when running the Change Based Alert job:

Invalid Field/Related field combination.

The details of the error are below:

Microsoft.Dynamics.Ax.Xpp.ErrorException: Exception of type ‘Microsoft.Dynamics.Ax.Xpp.ErrorException’ was thrown.

at Microsoft.Dynamics.Ax.MSIL.Interop.throwException(Int32 ExceptionValue)

at Microsoft.Dynamics.Ax.MSIL.cqlClassIL.callReturn(Int32 rc, interpret* ip)

at Microsoft.Dynamics.Ax.MSIL.cqlClassIL.Call(IntPtr c, String methodName, Object[] parameters, Type[] types, Object[] varargs, Type[] varargsTypes)

at Dynamics.Ax.Application.QueryBuildDataSource.Addlink(Int32 parentField, Int32 thisField)

at Dynamics.Ax.Application.EventProcessorCUD.addSubQuery(QueryBuildDataSource qbds, QueryBuildDataSource subQbds, Boolean link, Boolean ) in EventProcessorCUD.addSubQuery.xpp:line 37

at Dynamics.Ax.Application.EventProcessorCUD.addSubQuery(QueryBuildDataSource qbds, QueryBuildDataSource subQbds, Boolean link, Boolean ) in EventProcessorCUD.addSubQuery.xpp:line 52

at Dynamics.Ax.Application.EventProcessorCUD.Processruleupdate(EventRuleField _ruleField, EventCUD _event) in EventProcessorCUD.processRuleUpdate.xpp:line 233

at Dynamics.Ax.Application.EventProcessorCUD.Processupdate(EventCUD _event, String _userId) in EventProcessorCUD.processUpdate.xpp:line 60

at Dynamics.Ax.Application.EventProcessorCUD.Process(EventCUD _event, String _userId) in EventProcessorCUD.process.xpp:line 8

at Dynamics.Ax.Application.EventProcessorCUD.Run(Int64 _recId, String _userId) in EventProcessorCUD.run.xpp:line 16

at Dynamics.Ax.Application.EventJobCUDTask.runCudEventsForUser(Object[] _args) in EventJobCUDTask.runCudEventsForUser.xpp:line 39

at EventJobCUDTask::runCudEventsForUser(Object[] )

at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)

at Microsoft.Dynamics.Ax.Xpp.PredefinedFunctions.runas(String userId, Int32 classId, String staticMethodName, Object[] parms, String company, String language, String partitionKey)

at Dynamics.Ax.Application.EventJobCUDTask.Run() in EventJobCUDTask.run.xpp:line 24

at Dynamics.Ax.Application.BatchRun.runJobStaticCode(Int64 batchId) in BatchRun.runJobStaticCode.xpp:line 56

at Dynamics.Ax.Application.BatchRun.runJobStatic(Int64 batchId) in BatchRun.runJobStatic.xpp:line 13

at BatchRun::runJobStatic(Object[] )

at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)

at BatchIL.taskThreadEntry(Object threadArg)

Does this look familiar to anyone?

Thank you

You can see that the link added at line 37 of EventProcessorCUD**.**addSubQuery() is invalid. Now use debugger to find out which link is being added and what’s the problem with it.