title: Getting dimension of a line from purchline in Dynamics AX 2012
body: <p>When I create a Purchase Order, and create Purchase Order lines associated with that purchase order, I can open up the Line details for the line, and then click the "Financial Dimensions" tab for the line and select a financial dimension to associate with the purchase order line.</p>
  
  <p>Having done this, if I examine the database in SQL Server, I can see an entry in PURCHTABLE for my purchase order, and a corresponding line in the related table PURCHLINE which uses the PURCHID field to associate multiple PURCHLINE row's with one PURCHTABLE row.</p>
  
  <p>However - although in the client, I can see the financial dimensions associated with my PURCHLINE, by looking in the line details section of the purchase order screen, I cannot find where this information is stored in the database to link it to my PURCHLINE row.</p>
  
  <p>The PURCHLINE table has a LEDGERDIMENSION field which [from what I can determine by looking at the AOT] should associate it with a row in DIMENSIONATTRIBUTEVALUECOMBINATION, however in all of the rows in PURCHLINE, the LEDGERDIMENSION field is set to 0.  The DEFAULTDIMENSION field in the PURCHLINE table has values, however the table to which it relates (DIMENSIONATTRIBUTEVALUESET) has nothing but a HASH as its content - and no apparent relationships to any other table that would allow me to figure out what dimension it represents.</p>
  
  <p>Does anyone know where in the database the data is stored that allows Dynamics AX to associate a set of financial dimension attributes to a Purchase Order line?</p>