Linkedin Profile

https://www.linkedin.com/in/hafiz-usama-a2111195

Wednesday 19 April 2017

Duplicate type with name ‘Dynamics.Ax.application.TableName

Hello All,
Recently I faced really a weird issue. I was trying to import a simple project in AX 2012 and it was giving annoying error on import of a table "Duplicate type with name ‘Dynamics.Ax.application.TableName". When I tried to generate CIL it gave me the same error again and CIL couldn't be completed.
Later on it stopped system AIF services too. 
So I followed below steps to resolve the issue:

1) Stop AOS service.
2) Delete all files on the AOS server under C:\Program Files\Microsoft Dynamics AX\60\Server\<aos instance name>\bin\XppIL
3) Connect to the model db via SQL Management studio
4)Truncate the table SYSXPPASSEMBLY which lists all of the files found in step 2
5) Start AOS service
6) Run Full CIL

and the issue is resolved. Keep Daxing !

Get old value of AX table Field

Hello Folks,

Hope y'all are doing well.

I was working on a requirement where I had to use previous value of a column.
For Example there are 2 columns in table Coulmn1 (Editable) and Coulmn2 (Non Editable). 

And, Column2 = Column2 + Column1.

Lets discuss a scenario, Column1 = 0 and Column2 = 5
we edit Column1, Now :Column1 = 5 and Column2 = 10
lets edit it one more time: Column1 = 10 and Column2 = 20 which is wrong, it should be 15.

I needed previous value of Column1 so I can subtract it from Column2 to get original Value of Coulmn2. For this, there is a method named 'orig'. I used it in modified Field Method and Implemented it like this
tableBuffer.Column2 = (tableBuffer.Orig().Column1 - tableBuffer.Column2) //returned original //C1 Value + tableBuffer.Column1;

Keep DAXing.