I have a Cache Extension:
namespace PX.Objects.SO
{
public class SOLineExt : PXCacheExtension<SOLine>
{
[PXBool]
[PXUIField(DisplayName="Sales Promotion", Enabled = false, IsReadOnly = true)]
public virtual bool? UsrSalesPromotion { get; set; }
public abstract class usrSalesPromotion : IBqlField { }
}
}
and a Graph Extension:
public class SOOrderEntry_Extension:PXGraphExtension<SOOrderEntry>
{
protected void SOLine_RowSelecting(PXCache cache, PXRowSelectingEventArgs e)
{
var salesOrderEntry = (SOLine)e.Row;
if (salesOrderEntry == null)
return;
SOLineExt soLineExt = PXCache<SOLine>.GetExtension<PX.Objects.SO.SOLineExt>(salesOrderEntry);
PXUIFieldAttribute.SetEnabled<soLineExt.usrSalesPromotion>(cache, salesOrderEntry, false);
}
}
}
The problem that I am having is that SOLineExt is not found which I think is because the cache extention was created through Project Customization which puts the resulting .cs file in the Runtime_App folder (How to reference new field if it is DAC Extension, see last comment).
How do I fix this?