Search code examples
tfstfsbuildaxaptadynamics-ax-2012

XPO Import - Relation is incomplete due to missing fields


I have been setting up builds for quite some time now. To do this, I use the scripts Microsoft provided for AX 2012 (Build and deploy scripts for Microsoft Dynamics AX 2012)

There were some tweaks to be done in the scripts to get TFS working the way it should and it also involved some extra actions because we have code in the startupPost (fe precompilation with message window instead of compiler output form due to modification in the sysSetupFormRun class)

But what is haunting me for some weeks now is the XPO import. The provided script uses the latest CombineXPO tool to combine all of the XPO files that were fetched from TFS into one big XPO. Once that is done, the XPO is imported in Ax.

And the real problem here is that I do not trust the XPO import because we have frequently been seeing huge amounts of errors like :

Compiler ERROR: \Data Dictionary\Tables\EPSICParameters\EPSICParameters : Relation Currency is incomplete due to missing fields

And indeed the fields aren't there in Ax, but when I look in the XPO that was supposed to be imported,the relation fields are present which indicated that the sources were fetched fine from TFS.

REFERENCE #Currency
    PROPERTIES
      Name                #Currency
      Table               #Currency
      RelatedTableCardinality   #ZeroOne
      Cardinality         #ZeroMore
      RelationshipType    #Association
      UseDefaultRoleNames #Yes
    ENDPROPERTIES

    FIELDREFERENCES
      REFERENCETYPE PKFK
      PROPERTIES
        Field               #CurrencyCode
        RelatedField        #CurrencyCode
        SourceEDT           #CurrencyCode
      ENDPROPERTIES

    ENDFIELDREFERENCES
  ENDREFERENCE

Anyone who could help me out here? This thing is really blocking our automated builds with Ax because we simply cannot tell when the next build is going to run fine :s


Solution

  • Try doing the import twice, ignore any errors from the first run.