Showing posts with label AX. Show all posts
Showing posts with label AX. Show all posts

Thursday, October 7, 2010

Error While Synchronizing Database In Dynamics AX 2009 (There is a field mismatch in the union query. Field AccountNum is not compatible with field PartyId.)

 

Yesterday I was trying to install Dynamics AX 2009 . Suddenly I received the following error when I started the Synchronize Database Step in Initialization Checklist :-

Error While Synchronizing Database In Dynamics AX 2009 (There is a field mismatch in the union query. Field AccountNum is not compatible with field PartyId 1

Then I started to think why this error occurred. Maybe because I changed some of the properties in the Modify Data Types Step . So I returned back to Modify Data Types Step and changed back everything to their Default Values but unfortunately everything is the same . I tried to Synchronize again and the error occurred.

So I finished all the Steps in Initialization Checklist and started to investigate.

I opened AOT > Data Dictionaries > Views > Dirpartyview > Fields .

And then I saw the StringSize Property of both the fields ( AccountNum, PartyId ). and Woooh they are not the same. so that’s why they are not compatible.

Error While Synchronizing Database In Dynamics AX 2009 (There is a field mismatch in the union query. Field AccountNum is not compatible with field PartyId 2

 

Error While Synchronizing Database In Dynamics AX 2009 (There is a field mismatch in the union query. Field AccountNum is not compatible with field PartyId 3

 

If you noticed both fields Data Source Property is the CustTable . so what you need to do is going to CustTable and right click on PartyId field and choose Add-Ins > Open new window > Open used Extended Data Type

Error While Synchronizing Database In Dynamics AX 2009 (There is a field mismatch in the union query. Field AccountNum is not compatible with field PartyId 4

 

Then you will notice StringSize Property of DirPartyid changed it to be the same as AccountNum StringSize Property.

Error While Synchronizing Database In Dynamics AX 2009 (There is a field mismatch in the union query. Field AccountNum is not compatible with field PartyId 5

 

That’s it Smile . Save your changes and Synchronize the Database Again.

Maybe you will have warnings that few tables will be dropped and recreated but it is okay as long as you don’t have any data yet.

 

Conclusion:-

I didn’t know what is exactly the reason for this error. Maybe it is bug or maybe something wrong I did in the Initialization but there’s a solution for it Smile.