Skip to main content

I’m trying to override the MaxValue on MarkupPct field for Stock Item screen (it is currently 1000).  In my graph extension I have: 

cPXMergeAttributes(Method = MergeMethod.Merge)]
rPXCustomizeBaseAttribute(typeof(PXDecimalAttribute), nameof(PXDecimalAttribute.MaxValue), 9999)]
protected void InventoryItem_MarkupPct_CacheAttached(PXCache sender) { }

but I still can’t enter more than 1000.  Any ideas?

I’m trying to override the MaxValue on MarkupPct field for Stock Item screen (it is currently 1000).  In my graph extension I have: 

cPXMergeAttributes(Method = MergeMethod.Merge)]
rPXCustomizeBaseAttribute(typeof(PXDecimalAttribute), nameof(PXDecimalAttribute.MaxValue), 9999)]
protected void InventoryItem_MarkupPct_CacheAttached(PXCache sender) { }

but I still can’t enter more than 1000.  Any ideas?

Rookie mistake.  I noticed it right after I posted.  Should be PXDBDecimalAttribute not PXDecimalAttribute


Hi @rjean09  Please use the below code. I have verified it and it is working as expected.

 

   PXMergeAttributes(Method = MergeMethod.Merge)]
PXRemoveBaseAttribute(typeof(PXDecimalAttribute))]
PXDBDecimal(6, MinValue = 0, MaxValue = 9999)]
protected void InventoryItem_MarkupPct_CacheAttached(PXCache sender) { }

 


Reply