Question

Increasing length of the Pay Item CD field

  • 27 March 2024
  • 5 replies
  • 51 views

Userlevel 4
Badge

Hi,

I have created a Database Script to increase the length of the PayItemCD field from 10 to 20, but I can't seem to find where to do this for the on-screen field shown below.

I can type as many characters as I like into the Pay Item field, but once I click into another field, it cuts it down to 10 characters.

I have updated the MaxLength property of the field, but that hasn't seemed to help.

Is there another way to increase the length of this field?

Kind regards,

Andrew

 

Enter as many characters as I want

 

After clicking out of the field, text is shortened to 10 characters

 

Max Length property set to 20

 


5 replies

Userlevel 6
Badge +4

Hi @AndrewA 

You have to change the field declaration in the specific DAC

You can see in this example changing a column on the table Contract

Customization Project

 

Also I suggest to change sizes or define new columns or tables through the Database Scripts no code option. Acumatica sometimes add additional definitions on tables and columns that are optimized

 

Userlevel 4
Badge

Hi @Leonardo Justiniano ,

Thanks for your response. I have created the Database Script the way you mentioned, so it should be all good on the database side. For the on-screen field, I have added the PXDBString change to the field, as shown below, but it still doesn't do anything.

It may have something to do with the fact that no attributes seem to appear in this screen, so I am not sure if the attributes are able to be amended. Is it blank for you as well?

Are there any other ways for the length of on-screen fields to be extended?

Kind regards,

Andrew

 

Userlevel 5
Badge +1

Hi @AndrewA,

This blog will help you to extend field length in Acumatica.

Regards,

Sagar, Greytrix

Userlevel 6
Badge +4

@AndrewA

 

The way you are defining the change sounds good “Replace Original” You are missing, though, the labeling. You need to add on a replace:

[PXUIField(DisplayName = ".. Label ..")]

Sometimes the screen editor does not show the base definition properly (glitches or ISV components). For I can see also in your screenshot you are trying to modify a field from a 3rd party provider (ISV) or Internal development. I recommend to request the change to them. Otherwise, inspect the record and determine the class and then implement a cache attached replacement:

 

...
using MYOB.AdvanceLive.People.Objects.PP;

public class XYZ_Graph_Extension : PXGraphExtension<XYZ_Graph>
{

...

[PXMergeAttributes(Method = MergeMethod.Replace)]
[PXUIField(DisplayName = ".. LABEL ..")]
[PXDBString(20, IsKey = true, IsUnicode = true, InputMask = "CCCCCCCCCCCCCCCCCCCC")]
protected void _(Events.CacheAttached<MPPayItem.payItemCD> e) { }

...

}

 

Also, as @Sagar Greytrix mentioned, take a look to the blog. If the DAC fields do not appear in the DATA ACCESS section you must have them declared in the CODE section as a DAC class. If it is an not there, must be an external library or the declaration is in another package, Find the package and make the change. As I stated above, you are at risk if the provider of the package comes with a new version which will override your change.

 

Userlevel 4
Badge

Hi @Leonardo Justiniano ,

Thanks for your response. I gave the customisation a go and it didn't work, so I will see if I can find this external library to make the change there.

Kind regards,

Andrew

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