I have an extension for the POReceiptLineAdd Class:
public class POReceiptLineAddExt : PXCacheExtension<POReceiptLineAdd>
{
public static bool IsActive()
{
return true;
}
#region UsrSONbr
[PXString]
[PXUIField(DisplayName = "Sales Order Nbr")]
[PXUIEnabled(typeof(False))]
public virtual string UsrSONbr { get; set; }
public abstract class usrSONbr : BqlString.Field<usrSONbr> { }
#endregion
#region UsrFSNbr
[PXString]
[PXUIField(DisplayName = "Service Order Nbr")]
[PXUIEnabled(typeof(False))]
public virtual string UsrFSNbr { get; set; }
public abstract class usrFSNbr : BqlString.Field<usrFSNbr> { }
#endregion
}
I will fill in the values with the corresponding Sales Order or Service Order number via a separate processing form.
So, when I extend the AddPOReceiptLineExtension graph, and override the method: POReceiptLinesSelection(), I want to be able to have it pull up those values through the POReceiptLineAdd projection.
It seems that POReceiptLineAdd mainly uses POReceiptLine, so it seems like that is a good place to put the values in the database. So, I add the values usrFSNbr and UsrSONbr to POReceiptLine, but they are not I cannot retrieve them after a data read.
In other words:
var res = PXSelectJoin<POReceiptLineAdd,
InnerJoin<POReceipt,
On<POReceipt.receiptType, Equal<POReceiptLineAdd.receiptType>,
And<POReceipt.receiptNbr, Equal<POReceiptLineAdd.receiptNbr>>>>,
Where<POReceiptLineAdd.receiptNbr, Equal<@P.AsString>,
And<POReceiptLineAdd.lineNbr, Equal<@P.AsInt>>>>
.Select(this.Base, item.ReceiptNbr, item.ReceiptLineNbr).TopFirst;
var TST = res.GetExtension<POReceiptLineAddExt>().UsrFSNbr
Will always return a null value, even though I have put values in the SQL database.
How can I extend the projection so I can add this field to what it is retrieving?