Several questions have been raised recently regarding how Connector for Microsoft Dynamics supports integrating data to and from Microsoft Dynamics AX 2012 inherited tables. These tables normally are implemented similarly to how the DirParty tables are implemented in the base application and I will use Connector’s support for those tables as an example of how you can develop your integrations to your own inherited tables.
Customers in Microsoft Dynamics AX 2012 can either be organizations or persons – each of which are concrete implementations of DirPartyType. However at transformation time Connector does not get any Type information from Microsoft Dynamics AX 2012 other than the base type – DirPartyType so we do not know to which concrete type to cast instances of these objects to. In order to support this polymorphic type we created our own ConnCustomerOrgService in Microsoft Dynamics AX 2012 that is installed as part of our XPO. This service’s query is nearly identical to the
CustCustomerService that ships with Microsoft Dynamics AX 2012 but it restricts the DirPartyTypes returned to only be organizations and since we know this type at design time, we can list the type of these objects in the Conn Customer Service object configuration file as DirPartyOrganization and the transformation engine can successfully cast instances of these objects at runtime. This does restrict us to only integrating customers of type organization out of the box, but customers are free to implement a copy of this service that would be restricted to just DirPartyPersons and then create new maps in Connector to integrate to and from this new service. So if you have polymorphic types in your services (which I suspect is almost always the case with inherited tables) you’d need to implement a service for each of the concrete types, as we have done for Customers.