Skip to main content

Hi,

I have recently added a new custom Ship Date field to the Project Quotes screen, but I am finding that this field isn’t having its value persisted after saving and refreshing the screen.

Is there a property or piece of code I need to add in to ensure this new keeps its value?

Below is the code I have used to create the new field, as creating it via the usual method was producing the same non-persisting result.

Let me know if you need any other information.

Kind regards,

Andrew

 

namespace PX.Objects.PM
{
public class PMQuoteExt : PXCacheExtension<PX.Objects.PM.PMQuote>
{
#region UsrShippingDate
PXDBDate]
PXUIField(DisplayName="Ship Date")]
public virtual DateTime? UsrShippingDate{ get; set; }
public abstract class usrShippingDate: PX.Data.BQL.BqlDateTime.Field<usrShippingDate> { }
#endregion
}
}

 

Hi @AndrewA ,

The PMQuote DAC is a Projection DAC and is associated with the CRQuote DAC. So, if you add the field only in one DAC, it won't work. The field should be created on both sides, as shown below.

public class CRQuoteExt : PXCacheExtension<PX.Objects.CR.Standalone.CRQuote>
    {
        #region UsrShippingDate
        /PXDBDate]
        ePXUIField(DisplayName="ShippingDate")]

        public virtual DateTime? UsrShippingDate { get; set; }
        public abstract class usrShippingDate : PX.Data.BQL.BqlDateTime.Field<usrShippingDate> { }
        #endregion
    }

public class PMQuoteExt : PXCacheExtension<PX.Objects.PM.PMQuote>
    {
        #region UsrShippingDate
        >PXDBDate(BqlField = typeof(CRQuoteExt.usrShippingDate))]
        yPXUIField(DisplayName="ShippingDate")]
        public virtual DateTime? UsrShippingDate { get; set; }
        public abstract class usrShippingDate : PX.Data.BQL.BqlDateTime.Field<usrShippingDate> { }
        #endregion
    }


Thanks for that Jini! The client has now decided they don’t want this field on the Project Quotes screen, but I have marked your comment as the answer for anyone else who runs into this issue.


Reply