-->

AX 2012: Invalid application object name error while creating child table fields

Error message: 

Invalid name. The application object already exists. 

Audience

Dynamics AX 2012 (FP, R2, R3) X++ Developers, Functional and Technical consultants and advanced users


Background

Using inheritance in tables, you may receive the subject mentioned error
"Invalid name. The application object already exists."

Problem

This error comes due to the fact that two tables inheriting from the same base table cannot have fields with same name. To avoid such error, you need to put distinct name among each table extending the same base table.

Reason

The reason is not any of the object oriented myths :) The simple reason is that, no matter how many levels of abstraction the AOT layer add to schema items like tables, a table among its extending tables exists only once at the database layer (SQL) . This is like that since child tables actually only exists at AOT layer. Physically there is one single base table. The data resides in one table physically which is abstracted at AOT as child tables.

That means, if you have a base table with 100 child tables, there would be only one physical table for all of them at the database layer. For this reason, you cannot have same name field(s) for different child tables extending same base table.

Conclusion

Keep each child table's field names distinct among all sibling tables.

2 comments:

Unknown said...

Good brief explanation.

Unknown said...

Good brief explanation.

Post a Comment

top