Solved

Override MaxValue on MarkupPct


Userlevel 3
Badge +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?

icon

Best answer by rjean09 7 June 2022, 18:26

View original

2 replies

Userlevel 3
Badge +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?

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

Userlevel 7
Badge +17

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


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved