Solved

How to change size of a nvarchar DAC field in an existing screen ?

  • 12 April 2023
  • 4 replies
  • 145 views

Userlevel 3
Badge

Hi,

I need to expand the size of a dac field in an existing screen. For example I need to change nvarchar(50) size into nvarchar(100). Is it possible to do this using customization project editor  or is there any other way to do this? Can someone provide me the guidance please?

Thank you.

icon

Best answer by sweta68 12 April 2023, 06:42

View original

4 replies

Userlevel 7
Badge +10

Hi @oshadarodrigo64 ,

If you have a custom field on your existing screen, then this blog will help you.

https://www.greytrix.com/blogs/acumatica/2023/01/27/increase-column-length-in-acumatica/

Regards,

Sweta

Userlevel 3
Badge

Thank you for the reply @sweta68 !

Userlevel 4
Badge +1

@oshadarodrigo64 yes you can change the length of custom field in existing screen.In the project editor for that field we can customize attributes and change the length.

Userlevel 5
Badge +3

To change the length, you need to add the PXDBString attribute and in a brackets specify the length whiсh you want. Also value of string lenght should be the same in code, SQL, and customization. If it's not it could be a data lost. Also you need change value in SQL table and than you need to press Reload from Database button in Database Scripts in your customization package

 [PXDBString(100, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Description")]
public virtual string OrderDesc { get; set; }
public abstract class orderDesc :
PX.Data.BQL.BqlString.Field<orderDesc>
{ }

To change value length using customization, you need to click Increase Column Length under Database Scripts and in the window select needed table, then the field and after that set the desired length

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