I was getting following error during customization of Dynamics AX.
After some debugging i found that it is due to model. Error can be resolved by updating model. In this blog i am working with smmActivities but it can applied for any table.
Goto your table in AOT you will see model name in square brackets in light color grey. You have to add this model to resolve issue. In my case model name is “Case Management”.
In toolbar go to Dynamics 365 →Model Management → Update model parameters.
Select your model in which you are doing your customization, in my case it is “testModel” and click on next, scroll down and select “Case Management” and select next and then click on finish.
Build your solution error should be gone now.