Skip to main content

i have a problem with my tabs the default values isnt working with the tabs 

also the save isnt saving the views for the tabs it only saves the master values only

this is my screen 

 

and this is my tab dac

 

>PXCacheName("InspectionMalfunctionCheck")]
    ÂPXPrimaryGraph(typeof(InspectionFormEntry))]
    public class InspectionMalfunctionCheck : IBqlTable
    {
        #region malfunctionCheckID
        public abstract class malfunctionID : PX.Data.IBqlField
        {
        }
        protected int? _MalfunctionID;
        PXDBIdentity(IsKey = true)]
        nPXUIField(Enabled = false)]
        public virtual int? MalfunctionID
        {
            get
            {
                return this._MalfunctionID;
            }
            set
            {
                this._MalfunctionID = value;
            }
        }
        #endregion

        #region InspectionNbr
         PXDBString(20, InputMask = "")]
        #PXUIField(DisplayName = "Inspection Nbr")]
         PXDBDefault(typeof(InspectionFormInq.inspectionFormNbr))]
        DPXParent(typeof(Select<InspectionFormInq,
                    Where<InspectionFormInq.inspectionFormNbr,
                    Equal<Current<InspectionFormInq.inspectionFormNbr>>>>))]
        public virtual string InspectionNbr { get; set; }
        public abstract class inspectionNbr : PX.Data.BQL.BqlString.Field<inspectionNbr> { }
        #endregion

        #region CarControlSysTest
        tPXDBString(1, InputMask = "")]
        .PXUIField(DisplayName = "أختبار نظام تحكم السيارة")]
         PXDefault("N")]
        yPXStringList
            (
            new string>] { "G", "M", "B", "N" },
            new stringØ] { "Good", "Medium", "Bad", "N/A" }
            )
        ]
        public virtual string CarControlSysTest { get; set; }
        public abstract class carControlSysTest : PX.Data.BQL.BqlString.Field<carControlSysTest> { }
        #endregion
}

You could try defining a constant:

public class notAvailable : PX.Data.BQL.BqlString.Constant<notAvailable>

        {

            public notAvailable() : base("N") { }

        }

 

Then:


The PXParent attribute is defining a relationship. The relationship statement you have would be defining a relationship of the parent record to itself. You need to define a relationship with the current table.

Like this:

[PXParent(typeof(Select<InspectionFormInq, Where<InspectionFormInq.inspectionFormNbr, Equal<Current<InspectionMalfunctionCheck.inspectionFormNbr>>>>))]

that was a terrible mistake :(

btw do you know why the 
        PXDefault("N")]
not working ?


The PXParent attribute is defining a relationship. The relationship statement you have would be defining a relationship of the parent record to itself. You need to define a relationship with the current table.

Like this:

[PXParent(typeof(Select<InspectionFormInq, Where<InspectionFormInq.inspectionFormNbr, Equal<Current<InspectionMalfunctionCheck.inspectionFormNbr>>>>))]


Reply