Reputation: 67
I'm trying to add a custom formula so that sometimes (based on a custom field) the Ext Price on the Opportunity details does not update. I can write the formula to override, but in some cases I want them to be largely disconnected (user enters the Ext and the Acumatica calculates the Unit Price.)
I've added the following code (dac extension for custom fields and header included for context. It seems like for some reason it's ignoring the DAC Extension for CuryExtPrice as the field name is also not reflected, the For testing I edited the Descr as well, and that heading change does show up. I've also tried editing the formula (for example putting in [PXFormula(typeof(Mult<CROpportunityProducts.curyUnitPrice, CROpportunityProducts.curyUnitPrice>))]
) just so I could see if it was paying any attention to me.
What am I doing wrong, and is there a way to override the ext price formula on the DAC?
namespace PX.Objects.CR
{
[PXNonInstantiatedExtension]
public class CR_CROpportunityProducts_TEK_ExistingColumn : PXCacheExtension<PX.Objects.CR.CROpportunityProducts>
{
#region CuryExtPrice
[PXDBCurrency(typeof(CROpportunityProducts.curyInfoID), typeof(CROpportunityProducts.extPrice))]
[PXUIField(DisplayName = "Ext. Price**")]
[PXDefault(TypeCode.Decimal, "0.0")]
public Decimal? CuryExtPrice { get; set; }
#endregion
#region Descr
[PXDBLocalizableString(Common.Constants.TranDescLength, IsUnicode = true)]
[PXUIField(DisplayName = "Taco Truck Name", Visibility = PXUIVisibility.Visible)]
public String? Descr { get; set; }
#endregion
}
public class CROpportunityProductsExt : PXCacheExtension<PX.Objects.CR.CROpportunityProducts>
Upvotes: 0
Views: 40