Skip to main content
Solved

Inventory Item Search truncates description in 2021 R2

  • September 29, 2021
  • 5 replies
  • 131 views

Forum|alt.badge.img+5

I added a bunch of items via the REST API to Stock Items. I then did an update on the description of those Stock Items (generally the description was longer than the original) also using the REST API.

 

In the search for Stock Items, the items appear with the correct description. However in Inventory Item search launched from a Sales Order, when I search for these same items, the Description is truncated.

 

Does anyone know why I am seeing this discrepancy? Is there something about the Inventory Stock Item search launched from a Sales Order that caches the description independent of the search available on the Stock Items screen?

Best answer by rosenjon

This looks to be a UI display bug, as I’ve played around with the system more. The fields aren’t actually truncated, but if the Add Items dialog is sized in a certain way, it makes it appear that way.

View original
Did this topic help you find an answer to your question?

5 replies

Forum|alt.badge.img+5
  • Author
  • Semi-Pro III
  • 293 replies
  • Answer
  • October 21, 2021

This looks to be a UI display bug, as I’ve played around with the system more. The fields aren’t actually truncated, but if the Add Items dialog is sized in a certain way, it makes it appear that way.


Forum|alt.badge.img+5
  • Author
  • Semi-Pro III
  • 293 replies
  • November 18, 2021

I remember this being a problem years ago when I first started playing with Acumatica. I figured out how to fix it by subclassing SOOrderEntry.cs in an extension library. You can then override the hardcoded length of the Description field for the PXProjection, which is set to 60 characters...that’s what the 60 in this line does:

        [PXDBLocalizableString(60, IsUnicode = true, BqlField = typeof(InventoryItem.descr), IsProjection = true)]
 

Maybe there is some other, more clever way to fix this in the customization project editor. However, if this is the only way to do this, I would suggest making this a configurable value and not hard coding it into the PXProjection. Many people have item descriptions longer than 60 characters, and this basically presents as a bug unless you are a developer...

 

        #region Descr
        public abstract class descr : PX.Data.BQL.BqlString.Field<descr> { }

        protected string _Descr;
        [PXDBLocalizableString(60, IsUnicode = true, BqlField = typeof(InventoryItem.descr), IsProjection = true)]
        [PXUIField(DisplayName = "Description", Visibility = PXUIVisibility.SelectorVisible)]
        public virtual String Descr
        {
            get
            {
                return this._Descr;
            }
            set
            {
                this._Descr = value;
            }
        }
        #endregion


Forum|alt.badge.img+5
  • Jr Varsity II
  • 237 replies
  • November 18, 2021

You can modify the attributes in the customization project editor which for something this simple would likely be a lot easier.

 


Forum|alt.badge.img+5
  • Author
  • Semi-Pro III
  • 293 replies
  • November 18, 2021

Cool, thank you Mark! That is exactly what I was wondering about.


Forum|alt.badge.img+5
  • Author
  • Semi-Pro III
  • 293 replies
  • November 19, 2021

One other comment on this one. I don’t really know why we are truncating the item description at all here? The grid natively sizes to a certain size...and if you expand the grid size, it should show more of the description. What useful purpose is served by artificially constricting the length of this field when it’s displayed in this grid, thus necessitating customization to undo it? Why not just make the length of this field the same size as the max length of the database field?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings