Hi @mjgrice32,
Please try this code below.
POCreate screen uses FixedDemand projection, SM_POCreate extension joins FSSODetFSSODetSplit projection to this projection. So we need to extend this second projection, and enable our new field in GetFixedDemandFieldScope.
I see only one problem here: PONbr doesn’t exist at this point, because we are going to create the Purchase Order now.
// Acuminator disable once PX1016 ExtensionDoesNotDeclareIsActiveMethod extension should be constantly active
public class SM_POCreateExt : PXGraphExtension<SM_POCreate, POCreate>
{
[PXOverride]
public virtual IEnumerable<Type> GetFixedDemandFieldScope(Func<IEnumerable<Type>> baseFunc)
{
foreach (var r in baseFunc())
{
yield return r;
}
// Add these fields to the Field Scope so they can be used in the
// Customization screen
yield return typeof(FSSODetFSSODetSplitExt.usrPONbr);
}
}
// Acuminator disable once PX1016 ExtensionDoesNotDeclareIsActiveMethod extension should be constantly active
public class FSSODetFSSODetSplitExt : PXCacheExtension<FSSODetFSSODetSplit>
{
#region UsrPONbr
public abstract class usrPONbr : PX.Data.BQL.BqlString.Field<usrPONbr> { }
[PXDBString(15, IsUnicode = true, InputMask = "", BqlField = typeof(FSSODetSplit.pONbr))]
[PXUIField(DisplayName = "PO Order Nbr.")]
public virtual string UsrPONbr { get; set; }
#endregion
}