D365O is a lot more sensitive about casting or should I say AX2012 was too relaxed about it. This post is to show a specific scenario that works differently in the new version of the product. We had a bit of code that worked fine in AX2012 but stopped working in D365O. After debugging we found that when you cast a table it took the tableId of the cast. Below is an example of AX2012 vs D365O: UPDATE – Thanks for Joris for pointing this out. Same code running in CIL in AX2012. The piece of code in question was running client side. Otherwise, I would have noticed this in AX2012 too.