Skip to main content
Solved

Additional columns to the Location column lookup of the Sales Orders form

  • September 8, 2023
  • 2 replies
  • 120 views

Hi community! 

I am trying to add extra columns to the Location lookup on the Details tab of the Sales Order form. 
I tried the following, but it is showing only the new columns and removing the original ones 

    public class SOOrderEntry_Extension : PXGraphExtension<PX.Objects.SO.SOOrderEntry>
    {
        #region CacheAttached
        [PXMergeAttributes(Method = MergeMethod.Merge)]
        [SOLocationAvail(typeof(SOLine.inventoryID), typeof(SOLine.subItemID), typeof(SOLine.costCenterID), typeof(SOLine.siteID), typeof(SOLine.tranType), typeof(SOLine.invtMult))]
        [PXCustomizeSelectorColumns(
                typeof(PX.Objects.IN.INLocation.locationCD),
                typeof(PX.Objects.IN.INLocationStatus.qtyAvail),
                typeof(PX.Objects.IN.INLocationStatus.qtyOnHand),
                typeof(PX.Objects.IN.INLocationStatus.active),
                typeof(PX.Objects.IN.INLocation.receiptsValid),
                typeof(PX.Objects.IN.INLocation.salesValid),
                typeof(PX.Objects.IN.INLocation.transfersValid),
                typeof(PX.Objects.IN.INLocation.projectID),
                typeof(PX.Objects.IN.INLocation.taskID),
                typeof(PX.Objects.IN.INLocation.primaryItemID),
                typeof(PX.Objects.IN.INLocation.primaryItemClassID))]
        public virtual void SOLine_LocationID_CacheAttached(PXCache sender) { }
        #endregion
    }


Could someone help me keep the original columns? 
Thanks!

Best answer by Zoltan Febert

Hi @acalvo06,

You need to use INLocationStatusByCostCenter with this selector, INLocationStatus doesn’t work here.

    public class SOOrderEntry_Extension : PXGraphExtension<PX.Objects.SO.SOOrderEntry>
    {
        #region CacheAttached
        [PXMergeAttributes(Method = MergeMethod.Merge)]
        [SOLocationAvail(typeof(SOLine.inventoryID), typeof(SOLine.subItemID), typeof(SOLine.costCenterID), typeof(SOLine.siteID), typeof(SOLine.tranType), typeof(SOLine.invtMult))]
        [PXCustomizeSelectorColumns(
            typeof(PX.Objects.IN.INLocation.locationCD),
            typeof(PX.Objects.IN.INLocationStatusByCostCenter.qtyAvail),
            typeof(PX.Objects.IN.INLocationStatusByCostCenter.qtyOnHand),
            typeof(PX.Objects.IN.INLocationStatusByCostCenter.active),
            typeof(PX.Objects.IN.INLocation.receiptsValid),
            typeof(PX.Objects.IN.INLocation.salesValid),
            typeof(PX.Objects.IN.INLocation.transfersValid),
            typeof(PX.Objects.IN.INLocation.projectID),
            typeof(PX.Objects.IN.INLocation.taskID),
            typeof(PX.Objects.IN.INLocation.primaryItemID),
            typeof(PX.Objects.IN.INLocation.primaryItemClassID))]
        public virtual void SOLine_LocationID_CacheAttached(PXCache sender) { }
        #endregion
    }

 

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

2 replies

Zoltan Febert
Jr Varsity I
Forum|alt.badge.img+3
  • Jr Varsity I
  • 176 replies
  • Answer
  • September 9, 2023

Hi @acalvo06,

You need to use INLocationStatusByCostCenter with this selector, INLocationStatus doesn’t work here.

    public class SOOrderEntry_Extension : PXGraphExtension<PX.Objects.SO.SOOrderEntry>
    {
        #region CacheAttached
        [PXMergeAttributes(Method = MergeMethod.Merge)]
        [SOLocationAvail(typeof(SOLine.inventoryID), typeof(SOLine.subItemID), typeof(SOLine.costCenterID), typeof(SOLine.siteID), typeof(SOLine.tranType), typeof(SOLine.invtMult))]
        [PXCustomizeSelectorColumns(
            typeof(PX.Objects.IN.INLocation.locationCD),
            typeof(PX.Objects.IN.INLocationStatusByCostCenter.qtyAvail),
            typeof(PX.Objects.IN.INLocationStatusByCostCenter.qtyOnHand),
            typeof(PX.Objects.IN.INLocationStatusByCostCenter.active),
            typeof(PX.Objects.IN.INLocation.receiptsValid),
            typeof(PX.Objects.IN.INLocation.salesValid),
            typeof(PX.Objects.IN.INLocation.transfersValid),
            typeof(PX.Objects.IN.INLocation.projectID),
            typeof(PX.Objects.IN.INLocation.taskID),
            typeof(PX.Objects.IN.INLocation.primaryItemID),
            typeof(PX.Objects.IN.INLocation.primaryItemClassID))]
        public virtual void SOLine_LocationID_CacheAttached(PXCache sender) { }
        #endregion
    }

 


  • Author
  • Freshman I
  • 3 replies
  • September 11, 2023

Thanks @zfebert56, that solved the problem! 


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