Skip to main content

Hi,

In Unit of Measure SCreen am trying to increase the ‘FromUnit’ and ‘ToUnit’ field length from nvarchar(6) to nvarchar(15) 

and am able to change from backend but am trying customize that field DAC Level but its throwing an error

 

 

#region FromUnit  
        rPXMergeAttributes(Method = MergeMethod.Append)]
        )PXDBString(15,IsUnicode =true,IsFixed =true)]
        public string FromUnit { get; set; }
        #endregion
        protected virtual void INUnit_FromUnit_CacheAttached(PXCache Sender)
        {
        }
        #region ToUnit 

        ÂPXMergeAttributes(Method = MergeMethod.Append)]
         PXDBString(15, IsUnicode = true, IsFixed = true)]
        public string ToUnit { get; set; }
        #endregion
        
        protected virtual void INUnit_ToUnit_CacheAttached(PXCache Sender)
        {
        }

Hi @FarhanaM60  We can not achieve this requirement for now, since there are many calculations involved. Below comment I have updated in the previous post.

 

The above issue, which you are getting with the CacheAttached event for UOM field.

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(15, 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 

 

Also, there is an idea also posted to consider this feature in the future. Please find the link here.

 

Hope this information will help you!!


Reply