Skip to main content
Answer

Limit number of characters in request line description field?

  • January 14, 2025
  • 4 replies
  • 83 views

Forum|alt.badge.img

On the Request form RQ301000, we would like to limit the number of characters in the RQRequestLine description field.  The default limit is 256.  Is there a relatively simple way to limit to 100 characters?

Best answer by DipakNilkanth

Hi ​@brockinl,

Do something like below in your extended DAC.

Use CacheAttached event of that field and set length as 100 in your DAC code.
 

 [PXNonInstantiatedExtension]
public class RQ_RQRequestLine_ExistingColumn : PXCacheExtension<PX.Objects.RQ.RQRequestLine>
{
#region Description
[PXDBString(100, IsUnicode = true)]

[PXUIField(DisplayName = "Description")]
protected void RQRequestLine_Description_CacheAttached(PXCache cache) { }
public string Description { get; set; }
#endregion

Note : I have not tested the logic.

Hope, it helps

4 replies

Kandy Beatty
Captain II
Forum|alt.badge.img+17
  • Captain II
  • January 14, 2025

Hi ​@brockinl 

This would require a small customization. Are you familiar with customizing in Acumatica? 


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • January 14, 2025

I have limited experience but have done a couple of small customization projects.  I’m currently testing a solution.


DipakNilkanth
Pro III
Forum|alt.badge.img+13
  • Pro III
  • Answer
  • January 14, 2025

Hi ​@brockinl,

Do something like below in your extended DAC.

Use CacheAttached event of that field and set length as 100 in your DAC code.
 

 [PXNonInstantiatedExtension]
public class RQ_RQRequestLine_ExistingColumn : PXCacheExtension<PX.Objects.RQ.RQRequestLine>
{
#region Description
[PXDBString(100, IsUnicode = true)]

[PXUIField(DisplayName = "Description")]
protected void RQRequestLine_Description_CacheAttached(PXCache cache) { }
public string Description { get; set; }
#endregion

Note : I have not tested the logic.

Hope, it helps


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • January 20, 2025

Thanks Dipak,

I’m exploring options with our Acumatica partner.