I am attempting to override the DAC attribute of TXAvalaraCustomerUsageType with a custom derivative. It is working on DAC extensions, however, there are some existing graphs that are already overriding with CacheAttached and if I try to do my own graph extension, it is not applying my change. For example:
CustomerMaint has this:
"PXDBString(1, IsFixed = true, BqlField = typeof(PX.Objects.CR.Standalone.Location.cAvalaraCustomerUsageType))]
/PXUIField(DisplayName = "Entity Usage Type", Required = true)]
/TXAvalaraCustomerUsageType.List]
/PXDefault("0", typeof(Search<CustomerClass.avalaraCustomerUsageType, Where<CustomerClass.customerClassID, Equal<Current<Customer.customerClassID>>>>))]
protected virtual void _(Events.CacheAttached<PX.Objects.CR.Standalone.Location.cAvalaraCustomerUsageType> e)
{
}
And I am trying to change the TXAvalaraCustomerUsageType.List (note: this is what’s in the code but the class is actually TXAvalaraCustomerUsageType.ListAttribute)
-PXRemoveBaseAttribute(typeof(TX.TXAvalaraCustomerUsageType.ListAttribute))]
bPXMergeAttributes(Method = MergeMethod.Append)]
bAvalaraCustomerUsageTypeAttribute1]
protected virtual void _(Events.CacheAttached<PX.Objects.CR.Standalone.Location.cAvalaraCustomerUsageType> e)
{
}
This is not working, but my attribute is good and it works in DAC extensions using
ePXRemoveBaseAttribute(typeof(TX.TXAvalaraCustomerUsageType.ListAttribute))]
public string AvalaraCustomerUsageType { get; set; }
But not working in cacheattached to override CustomerMaint.
Notice I have to use TXAvalaraCustomerUsageType.ListAttribute because TXAvalaraCustomerUsageType.List does not resolve to anything in the codebase, and yet, CustomerMaint class shows it as thus.