Question Status

Unanswered
Imran Azami asked a question on 11 Mar 2013 8:23 AM

Hi All,

I am unable to add new fields to DirPartyTable in AX 2012. When I save/open the table after creating the new field it throws some SQL synchronization error. I tried synchronizing the table but the error still persists.

Can anyone here help me to fix this. Thanks in Advance

/Imran

Reply
Martin Dráb responded on 11 Mar 2013 3:10 PM

Could you tell us more about the "some" error?

Martin "Goshoom" Dráb | Freelancer | Goshoom.NET Dev Blog

Reply
Mukesh Hirwani responded on 11 Mar 2013 11:19 PM

Hi Azami,

what kind of fields you want to add to DirPartyTable..? And what is d error while adding?

Mukesh Hirwani
http://mukesh-ax.blogspot.in/ 

   

Reply
Tommy Skaue responded on 12 Mar 2013 4:11 PM

The DirPartyTable is inheritable, so if you were to add a column with a name equal to one of the columns in the child tables (the ones inheriting DirPartyTable - like DirPerson), then it will fail.

What column are you trying to add to DirPartyTable?

Tommy Skaue | Dynamics AX Developer from Norway | http://yetanotherdynamicsaxblog.blogspot.no/ | www.axdata.no

Reply
Imran Azami responded on 20 Mar 2013 1:06 AM

Hi,

Apologies for not being clear in my earlier post. I am trying to create a new field of type Int64 in DirPartyTable. When I do that, the table synchronizes and throws the following errors.

"Cannot create a record in Global Address book (DirPartyTable). The SQL database has issued an error"

"SQL error description: [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid Column name "INTERNALPHONE"."

InternalPhone is my field name.

Synchronizing the table also throws the same error.

I am unable to open the table through table browser, or any form which has DirPartyTable under its datasource node.

I am working in AX 2012 R2. I tried in different installations of R2, but same result. 

I tried the same in R1, it worked there. It seems the problem is in R2.

/Azami

Reply
Tommy Skaue responded on 20 Mar 2013 1:24 AM

Can you head over to the database and have a look at the DIRPARTYTABLE itself? It sounds like the field is already there.

Tommy Skaue | Dynamics AX Developer from Norway | http://yetanotherdynamicsaxblog.blogspot.no/ | www.axdata.no

Reply
Martin Dráb responded on 20 Mar 2013 1:53 AM

It behaves in the same way in my AX2012 R2. I don't see what's wrong - it works for fields with other names, InternalPhone doesn't exists in table hierarchy and I can add column directly in database without problems.

I don't have time to investigate it right now, but I would really like to understand it - I'll take a look later.

Martin "Goshoom" Dráb | Freelancer | Goshoom.NET Dev Blog

Reply
Imran Azami responded on 20 Mar 2013 2:11 AM

Hi Martin and Tommy,

Thanks for replying.

I checked DB, the field isn't there. The real problem is the table stops synchronizing with DB immediately after creating the new field.

Its really strange. I have reported the same Issue to one of the AX Dev team member at Microsoft and awaiting reply.

Meanwhile, I too will try to investigate and post it back here if I find any solution.

/Azami

Reply
Martin Dráb responded on 25 Mar 2013 1:10 PM

I tried to add the field and synchronize DB with SQL Server Profiler running and it seems that no synchronization command is sent by AX, so something must be wrong in AX application logic. I think this needs to be resolved by Microsoft engineers, nevertheless they shouldn't have troubles to reproduce it - I managed to reproduce it in several distinct environments.

Martin "Goshoom" Dráb | Freelancer | Goshoom.NET Dev Blog

Reply
Tommy Skaue responded on 25 Mar 2013 1:20 PM

Wow. I'm at loss for words. Perhaps "INTERNALPHONE" is some weird Easter Egg? ;-)

Good catch, Martin.

Tommy Skaue | Dynamics AX Developer from Norway | http://yetanotherdynamicsaxblog.blogspot.no/ | www.axdata.no

Reply
Imran Azami responded on 26 Mar 2013 2:35 AM

Good work Martin :).

And, its not only InternalPhone I am unable to add any field to DirPartyTable and I think its because I tried first with Internalphone, so it throws the same error even when creating fields with different types and names later on.

Reply
Martin Dráb responded on 26 Mar 2013 2:45 AM

Yes, AX has the field in the model, so it tries to read it from database... Normally synchronization would fix it, but not in this case.

I deleted InternalPhone from AX - then AX tried to delete it from DB, which naturally failed, because there was no such field. So I simply added a field called "InternalPhone" to DB, AX synchronization happily deleted it and everything is back in normal.

Martin "Goshoom" Dráb | Freelancer | Goshoom.NET Dev Blog

Reply
Dynamics Santhosh responded on 18 Feb 2014 6:27 AM

Hi Martin Drab

           I am also trying to add fields in SalesTable /SalesLine in the USR Layer.After some time server is going to Not Responding State.I am restarting the Server When i am trying to Open the SalesTable Form i am getting DB Synch Error.Please help me out in resolving the issue.

Can u clarify me on whether we can do customizations in USR Layer or Not recommendable?

                                                                                                   Thank You

Regards

Hari Santhosh Reddy

Reply