Hi, I’d like to extend the InventoryAllocDetEnqResult DAC which provides data to the grid on the ‘Inventory Allocation Details’ screen.
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/62b44983-fc48-4e45-86c6-1a1624b19324.png)
I’ve used the following code to extend the DAC and extend a method on the graph.
public class InventoryAllocDetEnqResultExt : PXCacheExtension<PX.Objects.IN.InventoryAllocDetEnqResult>
{
public static bool IsActive() => true;
#region UsrUOM
OPXString(10)]
)PXUIField(DisplayName = "UOM")]
public virtual string UsrUOM { get; set; }
public abstract class usrUOM : PX.Data.BQL.BqlString.Field<usrUOM> { }
#endregion
}
public class InventoryAllocDetEnq_Extension : PXGraphExtension<PX.Objects.IN.InventoryAllocDetEnq>
{
public delegate IEnumerable<InventoryAllocDetEnqResult> CalculateResultRecordsDelegate();
)PXOverride]
public IEnumerable<InventoryAllocDetEnqResult> CalculateResultRecords(CalculateResultRecordsDelegate baseMethod)
{
IEnumerable<InventoryAllocDetEnqResult> p = baseMethod();
foreach (InventoryAllocDetEnqResult record in p)
{
record.GetExtension<InventoryAllocDetEnqResultExt>().UsrUOM = "EACH";
}
return p;
}
}
Everything compiles, but when I attempt to access the extension I get the error - ‘GetItemExtension failed’.
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/c094341b-d633-4039-a9b1-687cee8372f8.png)
One thing to point out is that the view which uses the DAC is a non-existent table, the data in the table is added when required and not extracted directly from a SQL table.
I cannot understand why this is happening? As anyone seen this before?