Trying to extend the length of the UOM field in Acumatica and not having much success. I’ve done the following(This UOM field references INUnit.ToUnit which was previously customized by another developer to extend the field length.):
Add the column length increase DB script:
That however did not increase the length in the DB so I increased in manually.
But I still got this error on the field I’m trying to customize:
@Freeman Helmuth It seems like you have just altered the field in the DB, you need to extend the DAC field as well to get the expected result.
Hi @Freeman Helmuth If you are modifying the length of TOUnit in INUNIT table, how to it will work for the other tables UOM?
You will need to override every single DAC, alter every single tab where the UOM is referenced to change the length. With every new update you will need to review all these customizations.
UOM field is available in around 125 tables , here is the table names for your reference.
@Naveen B Yes this is what we are doing, and we have all those other tables done already. Like I said, this is a field the previous developer missed when doing those, and I can’t figure out how to extend this one.
I’ve modified the DAC with the following:
But then I get this error:
And FYI: It is worth it to us. We have many different UOMs that we use to count and to receive in. Honestly its a bit ridiculous that Acumatica has this restriction. I have an open feature request for it.
Hi @Freeman Helmuth Understood.
As I see the error message, it is NOT an issue with the length but it is the issue casting from DECIMAL to STRING.
In your code, you might assigning the DECIMAL value to the UOM string field.
@Naveen B So it seems.
However this error occurs when doing nothing but the following in a customization: Add the database script to extend the DB field:
My DACs show customized properly in the DAC browser and the field lengths show correct-so why this odd error?
Hi @Freeman Helmuth
I tried to use the Increase Column lengthoption under the Database script to increase the field length of the UOM field from the AMBomMatl table. Not getting any error. Its working fine. May be causing issue with some other customization. Can you please cross check the customization once?
Hi @Freeman Helmuth
I tried to use the Increase Column lengthoption under the Database script to increase the field length of the UOM field from the AMBomMatl table. Not getting any error. Its working fine. May be causing issue with some other customization. Can you please cross check the customization once?
you have to customize the DAC as well
Do that and let me know what your results are
Hi @Freeman Helmuth I have tried your requirement and yes, when I use the CacheAttached I also get the same, which you are getting casting issue.
Then I dig deep and observed that this is not with other customizations and causing this with the CacheAttached event.
Here are more details.
INUnit DAC → ToUnit Field, used INUnitAttribute and there is logic related unit conversions, we can not simply replace with the PXDBString(80, Isunicode = true)
Due to the some calculations in the INUnitAttribute, hence getting the Casting i.e. Decimal to String.
I will recommend you to raise a support ticket to increase the length of INUnitAttribute
@Naveen Boga Hi! I’m trying to follow the thread above and have a quick question. My client has multiple custom fields and the Database Script is set to 150 character length but the system won’t let him save anything longer than 25 characters. Will this “Increase Column Length” feature solve this issue?
Hi, @cshaheen26 It might be mentioned 150 databases BUT have you also checked in the DAC level size?
I’m assuming that they might be provided only 25 characters in the DAC level. Please do verify and confirm.
@Naveen Boga It was that we needed to also Increase the Column Length in the Database Script. I guess the code under Data Access didn’t work on its own.
Thanks for the quick response :)
If you increase the Column Length from the customization package, the size will be increased only in the Database but NOT at the DAC.
Make sure DAC size and Database size should be the same.
@Naveen Boga I updated the Database Script to increase the Column Length, but how do I increase the DAC size. I am not sure I see how to do it from the above thread.
@Freeman Helmuth any luck on the casting error? I am getting same error when trying to extend attribute value field
@woodyg84 not sure that I’m the right person to answer on this. Can you post the code you’ve tried and maybe Naveen can give some input.
@Naveen B So it seems.
However this error occurs when doing nothing but the following in a customization: Add the database script to extend the DB field: