If you get this message: "The field with Id 0 does not exist in table" you might find yourself in one of the following situations:
1) you have a Map object and one of the fields you are using somehow was edited (renamed, deleted) and this might cause an issue when AX is trying to map the fields;
2) you have a View object and the same scenario as above applies, with the only remark that the View might be based on a Query / another View, in which case you should double check your underlying objects as well;
3) you are trying to dynamically call a field on a table / use maybe a Common type object and the field id you are using doesn't map to the actual instance of the table.
In either of the cases above a quick check of the code (maybe debug it so you actually see what is the object's type at runtime) will reveal the issue.
I am ruling out a DB sync issue since for sure that is the first thing you've tried and of course it didn't help with solving the problem (also a restart of the AOS was performed).
On the other hand, one other thing you could try is to reset the client caches since that might cause a problem with wrong objects' definition.