There is a field mismatch in the union Query. Field ActivityId is not compatible with ActivityId.

Hi Experts,

while doing Database Synchronization i am getting the below Error :

"There is a field mismatch in the union Query. Field ActivityId is not compatible with ActivityId.

Cannot execute a data definition language command on a worker project or Quotation commitments view(ResourceActivitycommitmentsView). The view cannot be created.The underlying table may not exist."

i am using Ax 2012R3 CU10.

help me.

Hi Kumar,

I remember seeing this before and here is a bit what might be happening at your end.

The AOT/SystemDocumentation/SqlDictionary table stores all the AOT tables and fiields and it also contains the information about views and its dependencies. When objects are synchronized in AOT the synchronization engine uses this SQLDictionary table to sync the AOT objects with the database.

Here is the link for more clarity about the SQLDictionary system table (this can’t be browsed and it is like a black box as it is system table)

msdn.microsoft.com/…/aa594213(v=ax.50).aspx

I would try the following:
Got to SQL server Management stuido and try finding the view ResourceActivitycommitmentsView and drop it.
Or run this query : DROP VIEW ResourceActivitycommitmentsView

Go back to AOT and synchronize the view
A view is a just a database object used for read only view of DAX data, and it will be recreated if missing when you synchronize data dictionary.

Hope this helps and Good luck.