Reputation: 187
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?
Upvotes: 0
Views: 242
Reputation: 187
So the answer is that I can't read what I type. Iwas using soLineExt instead of SOLineExt. It would be nice to have a way for VS/Resharper to not complain about not finding SOLineExt, but it is not imperative.
Upvotes: 1