Inserting data into abstract table

Hi all,

I need to insert data into EcoResProduct and its related table using x++. However i noticed that it is an abstract table which can be inserted using insert() method in x++. Is there any way to do that using x++?

It’s very simple - you can’t insert any records directly to any abstract class, in the same way as you can’t directly instantiate any abstract class. What you can do is to insert data to a concrete child of the abstract table (again, you can see the similarity with classes).

EcoResProduct has three children: EcoResDistinctProduct, EcoResDistinctProductVariant and EcoResProductMaster.

Hi,

You can use AIF framework for this purpose. To see an example from within AX - http://dynamics-ax.blogspot.com/2011/08/microsoft-dynamics-ax-2012-dive-into_30.html and from .NET http://dynamicsuser.net/forums/p/47474/241056.aspx#241056

Some more information on understanding product item data management services and structure -

  1. From MSDN blog - http://blogs.msdn.com/b/dynamicsaxscm/archive/2011/07/06/product-item-data-management-services.aspx

  2. Last but not least white paper on ‘Implementing the Item-Product data management framework for Microsoft Dynamics AX 2012 Applications’. If you google, you are bound to find this.