Skip to main content
Solved

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

  • 8 September 2023
  • 2 replies
  • 97 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!

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
}

 


Thanks @zfebert56, that solved the problem! 


Reply