On the Subcontracts screen I want to add a custom column to the Project ID selector.

The value will come from the Details tab of the Projects screen (sum of Revised Budget Total)

I’ve tried numerous ways to do this. This is what I am trying at the moment. I am simply trying to put a dummy string into the custom column as a proof of concept before doing any BQL selects at this point.
namespace PX.Objects.PO
{
[PXNonInstantiatedExtension]
public sealed class PO_POLine_ExistingColumn : PXCacheExtension<PX.Objects.PO.POLine>
{
public static bool IsActive() => true;
#region ProjectID
[PXMergeAttributes(Method = MergeMethod.Append)]
[PXCustomizeSelectorColumns(
typeof(POLine.alternateID),
typeof(USRBudgetTotalExt.usrBudgetTotal))]
public int? ProjectID { get; set; }
#endregion
}
public sealed class USRBudgetTotalExt : PXCacheExtension<PX.Objects.PO.POLine>
{
public static bool IsActive() => true;
#region UsrBudgetTotal
public abstract class usrBudgetTotal : PX.Data.BQL.BqlString.Field<usrBudgetTotal> { }
protected string _UsrBudgetTotal;
[PXString(20)]
[PXUnboundDefault(PersistingCheck = PXPersistingCheck.Nothing)]
[PXUIField(DisplayName = "Budget Total2", Visibility = PXUIVisibility.SelectorVisible, Visible = true)]
public string UsrBudgetTotal
{
get
{
try
{
return "Budget Total";
}
catch
{
return "JoeError";
}
}
set
{
this._UsrBudgetTotal = value;
}
}
#endregion
#region Event Handlers
#endregion
}
}
This code has some effect on the selector. It does not show either of the two columns I am adding, and it actually removes some of the default columns like Customer and Status. It also changes the order of the fields.

My next thought was to completely override the selector for the Project ID field. But I cannot find the actual select statement for that field.
- is this even possible to add a custom column that is an aggregate of another table based on the current line of the selector?
- If it is possible, any suggestions on the approach I should take
- Can anyone tell me how to get the select statement if I need to override it? In the code repository, the selector is based on an attribute which I cannot seem to find the source.