Skip to main content
Answer

Override MaxValue on MarkupPct

  • June 7, 2022
  • 2 replies
  • 65 views

Forum|alt.badge.img+1

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

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

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

Best answer by rjean09

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

[PXMergeAttributes(Method = MergeMethod.Merge)]
[PXCustomizeBaseAttribute(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

2 replies

Forum|alt.badge.img+1
  • Author
  • Semi-Pro III
  • Answer
  • June 7, 2022

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

[PXMergeAttributes(Method = MergeMethod.Merge)]
[PXCustomizeBaseAttribute(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


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • June 7, 2022

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) { }