public class MyDACExtension : PXCacheExtension{ #region MyCustomField [PXString(50)] [PXUIField(DisplayName="My Custom Field")] public virtual string MyCustomField { get; set; } #endregion } // ... MyDAC myDac = // retrieve from database MyDACExtension myDacExt = PXCache .GetExtension (myDac); string stateValue = (string) PXCache .GetStateExt(myDacExt, "MyCustomField");
public class MyDAC : PX.Data.IBqlTable { #region MyCustomField [PXDBString(50)] [PXUIField(DisplayName="My Custom Field")] public virtual string MyCustomField { get; set; } #endregion } // ... MyDAC myDac = // retrieve from database string stateValue = (string) PXCacheIn this example, we retrieve a state value for a field ("MyCustomField") that is automatically extended by the framework. We pass the DAC instance and field name to PXCache.GetStateExt method. The Acumatica Framework package library for PXCache.GetStateExt method is `PX.Data.dll`..GetStateExt(myDac, "MyCustomField");